CS301 LIVE QUIZ FINAL TERM 23/24 February 20, 2023 by Dilawar 134 Created on February 20, 2023 By Dilawar CS301 LIVE QUIZ FINAL TERM 23/24 1 / 20 A solution is said to be efficient if it solves the problem within its resource constraints i.e. hardware and time. True False 2 / 20 Which one of the following is known as "Last-In, First-Out" or LIFO Data Structure? Linked List Stack Queue Tree 3 / 20 What will be postfix expression of the following infix expression? Infix Expression : a+b*c-d ab+c*d- ab+c*d- abc+*d- abcd+*- 4 / 20 For compiler a postfix expression is easier to evaluate than infix expression? True False 5 / 20 onsider the following function: void test_a(int n) { cout << n << " "; if (n>0) test_a(n-2); } What is printed by the call test_a(4)? 4 2 0 2 4 0 2 2 4 6 / 20 If there are N external nodes in a binary tree then what will be the no. of internal nodes in this binary tree? N -1 N -1 N+2 N 7 / 20 If there are N internal nodes in a binary tree then what will be the no. of external nodes in this binary tree? N -1 N N +1 N +2 8 / 20 Also Read: ENG101 LIVE QUIZ FINAL TERM 23/24 If we have 1000 sets each containing a single different person. Which of the following relation will be true on each set: Reflexive Symmetric Transitive Associative 9 / 20 Which one of the following is NOT the property of equivalence relation: Reflexive ► Symmetric ► Transitive Associative 10 / 20 A binary tree of N nodes has _______. Log10 N levels Log2 N levels N / 2 levels N x 2 levels 11 / 20 The easiest case of deleting a node from BST is the case in which the node to be deleted ___________. Is a leaf node Has left subtree only Has left subtree only Has both left and right subtree 12 / 20 f there are N elements in an array then the number of maximum steps needed to find an element using Binary Search is _______ . N N 2 Nlog2N log2N 13 / 20 Merge sort and quick sort both fall into the same category of sorting algorithms. What is this category? O(nlogn) sorts Interchange sort Average time is quadratic None of the given options. 14 / 20 If one pointer of the node in a binary tree is NULL then it will be a/an _______ . Also Read: BNK601 FINAL TERM PAPERS 2023 + LIVE MCQ'S External node Root node Inner node Leaf node 15 / 20 We convert the ________ pointers of binary to threads in threaded binary tree. Left Right NULL None of the given options 16 / 20 If the bottom level of a binary tree is NOT completely filled, depicts that the tree is NOT a Expression tree Threaded binary tree complete Binary tree Perfectly complete Binary tree 17 / 20 What is the best definition of a collision in a hash table? Two entries are identical except for their keys. Two entries with different data have the exact same key Two entries with different keys have the same exact hash value. Two entries with the exact same key have different hash values 18 / 20 Suppose that a selection sort of 100 items has completed 42 iterations of the main loop. How many items are now guaranteed to be in their final spot (never to be moved again ) Also Read: Cs301 important questions for midterm 21 42 41 43 19 / 20 Suppose you implement a Min heap (with the smallest element on top) in an array. Consider the different arrays below; determine the one that cannot possibly be a heap: 16, 18, 20, 22, 24, 28, 30 16, 20, 18, 24, 22, 30, 28 16, 24, 18, 28, 30, 20, 22 16, 24, 20, 30, 28, 18, 22 20 / 20 Which of the following statement is correct about find(x) operation: A find(x) on element x is performed by returning exactly the same node that is found. A find(x) on element x is performed by returning the root of the tree containing x. A find(x) on element x is performed by returning the root of the tree containing x. A find(x) on element x is performed by returning the root of the tree containing x. Your score is The average score is 59% LinkedIn Facebook Twitter VKontakte 0% Restart quiz Related