Code Question Option A Option B Option C Option D Answer
CS301 The Compiler Generates ____________________ Automatically Member Functions Classes Objects Of A Class Constructors D
CS301 Which Traversal Gives A Decreasing Order Of Elements In A Heap Where The Max Element Is Stored At The Top? Post-Order Level-Order Inorder None Of The Given Options D
CS301 Which Of The Given Option Is Not A Factor In Union By Size: Maintain Sizes (Number Of Nodes) Of All Trees And During Union Make Smaller Tree The Subtree Of The Larger One Make The Larger Tree The Subtree Of The Smaller One Implementation: For Each Root Node I Instead Of Setting Parent[I] To -1 Set It To -K If Tree Rooted At I Has K Nodes C
CS301 It Will Be Efficient To Place Stack Elements At The Start Of The List Because Insertion And Removal Take Time Variable Constant Inconsistent None Of The Above B
CS301 After Creation Of An Array Size Can Be Increase But Can Not Be Decreased Size Can Be Decreased But Can Not Be Increased Size Can Neither Be Increased Nor Be Decreased Size Can Be Increased And Can Also Be Decreased C
CS301 Suppose We Had A Hash Table Whose Hash Function Is “N % 12” If The Number 35 Is Already In The Hash Table Which Of The Following Numbers Would Cause A Collision? 143 144 145 148 A
CS301 Suppose We Are Sorting An Array Of Eight Integers Using Quick Sort And We Have Just Finished The First Partitioning With The Array Looking Like This: 2 5 1 7 9 12 11 10 Which Statement Is Correct? The Pivot Could Be Either The 7 Or The 9 The Pivot Could Be The 7 But It Is Not The 9 The Pivot Is Not The 7 But It Could Be The 9 Neither The 7 Nor The 9 Is The Pivot A
CS301 A Node Cannot Be Deleted When The Node To Be Deleted Has Both Left And Right Subtrees True False B
CS301 In An Array List The Current Element Is The First Element The Middle Element The Last Element The Element Where The Current Pointer Points To A
CS301 Binary Search Is An Algorithm Of Searching Used With The Data Sorted Unsorted Heterogeneous Random A
CS301 Select The One False Statement About Binary Trees Every Binary Tree Has At Least One Node Every Non-Empty Tree Has Exactly One Root Node Every Node Has At Most Two Children Every Non-Root Node Has Exactly One Parent A
CS301 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 Whole Tree Itself Containing X A Find(X) On Element X Is Performed By Returning True B
CS301 For A Perfect Binary Tree Of Height 4. What Will Be The Sum Of Heights Of Nodes? 31 30 27 26 A
CS301 In Case Of Deleting A Node From Avl Tree Rotation Could Be Prolong To The Root Node Yes No A
CS301 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 C
CS301 Huffman Encoding Uses ___________ Tree To Develop Codes Of Varying Lengths For The Letters Used In The Original Message Linked List Stack Queue Binary Tree D
CS301 Which Of The Following Is A Property Of Binary Tree? A Binary Tree Of N External Nodes Has N Internal Node A Binary Tree Of N Internal Nodes Has N+ 1 External Node A Binary Tree Of N External Nodes Has N+ 1 Internal Node A Binary Tree Of N Internal Nodes Has N- 1 External Node B
CS301 The Nodes With No Successor Are Called ___________ Leaf Nodes Root Nodes Both Of These None Of These A
CS301 Consider The Following Sequence Of Push Operations In A Stack: Stack.Push(’7’); Stack.Push(’8’); Stack.Push(’9’); Stack.Push(’10’); Stack.Push(’11’); Stack.Push(’12’); 7 8 9 10 11 12 9 8 11 10 7 12 9 10 8 11 12 7 9 10 8 12 7 11 A
CS301 __________ Is The Maximum Number Of Nodes That You Can Have On A Stack-Linked List ? Zero 2N (Where N Is The Number Of Nodes In Linked List) Any Number None Of These C