Skip to main content

Posts

Showing posts with the label CS301 Recent Papers

CS301 Current Midterm Paper Fall 2013 File 1

CS301 Today's Paper by Saifi 21.what is the difference between "call by value" and "call by reference". 22.How to delete a node in a binary search tree. The node has two child nodes. 23.Write in Traverse Implementation. The tree with 4 nodes was given. 24.Cpp code was given and we have to tell the output of the code. 25.A tree was given and we have to write the Nodes in In-order and Pre-order Traverse form. 26.Cpp code was given and we have to correct the code.

CS301 Current Midterm Paper Fall 2013 File 3

by Amna Mishal MCS(2nd) on December 20, 2013 at 2:15pm My paper       Total 26 questions    20mcqs 1)       Inorder and postorder were given Inorder : {L,C,A,D,F,M} Postorder: {L,C,D,F,M,A}    :- à not sure about sequence Draw binary tree usning inorder and postorder. Hint: last variable of postorder is root.variables before the root in inorder forms left subtree and variables after the root in inorder forms right subtree. (5 marks) 2)       A tree was given and last node inserted was told.do double rotation to form AVL tree. (5marks) 3)       A tree was given,check if it is AVL tree.if not,given reason. 4)       A function was given,tell what thhis function is doing.function was of preoder tranversal. I forgot two questions…

CS301 Current Midterm Paper Fall 2013 File 2

by Allah's slave on December 20, 2013 at 1:02pm Asslam u alikum, paper was very easy, mostly from Moaz bhai files, can say 80% mcqs were from past and subjective 2 question from moaz file, Q1, how can we avoid dangling reference? marks 2 Q2: tree was given from that, we have to show, level-order traversal, tree nodes were, root 5...left child 2 right child 10....10's right child 20 and left child 8, 20's left child 15, right child 22 marks 3 Q3: why queue is linear data? marks 2 Q4: a program line was given from class template, and we had to tell it is true or false, and tell the reason as well marks 3 Q5: a program was given of reference variable, of 4 lines , we have to write comments in front and one line they says its wrong, we have to identify the line as well marks 5 Q6: a tree was given with nodes , and we have to follow the post order traversal and then make the binary search tree of it, marks 5,  best of luck to every one

CS301 Current Midterm Paper Fall 2013 File 5

Today Paper Total Questions = 26 Total Marks = 40 Total MCQs of 1 Mark = 20 Short Subjective Question of 2 Marks = 2 Subjective Question of 3 Marks = 2 Subjective Questions of 5 Marks = 2 MCQ’s was from past papers What is the difference between call by value and call by reference? 2 What is a pre-order traversal? 2 Redraw the given tree and write balance of it. 2 A code was given and we have to tell what the recursive function is doing. 3 10 integer values was given and we have to draw a binary search tree. Then delete a node 65 from it and redraw the tree. 5 Values was given and we have to draw AVL tree after balancing it. 5

CS301 Current Midterm Paper Fall 2013 File 4

by meya on December 20, 2013 at 4:29pm 75 percent MCQs from Moaaz file How we can delete a node with two Childs in a binary search tree using its right sub tree.(2 Marks) Explain the two cases in which we apply double rotation in An Avl tree.(2 Marks) If we delete the node from the given tree then draw the tree.(3 Marks) Draw AVL tree 2,1,4,5,9,3,6.(5 Marks)