CS303 Final

Ace your homework & exams now with Quizwiz!

For Binary Search Tree, the worst case searching complexity is ____________________. A) O(n) B) O(log n) C) O(n log n) D) O (1)

A) O(n)

Which of the following problem cannot be solved using recursion? A) Problems without base case B) Tree Traversal C) Tower of Hanoi D) Fibonacci series

A) Problems without base case

Because only the front element of a queue is visible, the operations performed by a queue are few in number. A) True B) False

A) True

Because the value of n for each recursive case is smaller than the original value of n, each recursive case makes progress towards a base case A) True B) False

A) True

A set is a collection that contains at most one ____________ element. A) null B) None of the given options C) duplicate D) indexed

A) null

In a max-heap, element with the greatest key is always in the which node? A) root node B) First node of left sub tree C) Leaf node D) First node of right sub tree

A) root node

In full binary search tree every internal node has exactly two children. If there are 100 leaf nodes in the tree, how many internal nodes are there in the tree? A) 25 B) 99 C) 101 D) 49

B) 99

An iterative algorithm is simpler than a recursive algorithm and thus easier to write, code, debug, and read. A) True B) False

B) False

Trees have linear data organization. A) True B) False

B) False

A dequeue is ___________________________________________________________. A) a queue with insert/delete defined for front side of the queue B) a queue with insert/delete defined for both front and rear ends of the queue C) a queue implemented with both singly and doubly linked lists D) a queue implemented with a doubly linked list

B) a queue with insert/delete defined for both front and rear ends of the queue

The goal of ________________ is to be able to access an entry based on its key value, not its location. A) map B) hash table C) set D) multiset

B) hash table

Tree Traversals in which left subtree is visited before the root and root is visited before the right subtree is called __________________ traversal. A) None of the given options B) Postorder C) Inorder D) Preorder

C) Inorder

Like the multiset, the multimap removes the restriction that the _________ are unique. A) None of the given options B) both C) keys D) values

C) keys

In a priority queue, just like a max heap, the___________ item is always removed first. A) last B) middle C) largest D) smallest

C) largest

A fuller table results in __________ collisions. A) less B) no C) more D) equal

C) more

A queue follows __________. A) LIFO (Last In First Out) principle B) Linear tree C) Ordered array D) FIFO (First In First Out) principle

D) FIFO (First In First Out) principle


Related study sets

death and immortality rn106 exam 1

View Set

Chapter 5/6 Economics Exam Questions

View Set

Accident & Health Insurance Policies

View Set

Chapter 1: Business Now: Change is the Only Constant

View Set

Chapter 3: Price floors and ceilings

View Set