Recursion
When implementing binary search recursively, what happens at each step if the target is not found?
The range within which to search is halved.
The entire collection gets sorted again before searching continues.
All elements in the collection are compared with the target again.
An element is added to the collection being searched through.
What is the space complexity of iterative mergesort on an array with 'n' distinct elements?
What occurs when a merge sort algorithm reaches a base case during its execution?
It begins comparing each pair of adjacent elements within a single array pass.
It performs an insertion sort on small arrays for efficiency improvement.
It switches from recursive calls to iterative processing of data subsets.
It stops dividing arrays because it has reached an array size of one or zero elements.
In a recursive merge sort algorithm, what is the role of the merge function?
To split the array into smaller subarrays for recursion.
To determine the position of the middle element of an array
To identify if the array is already sorted and skip the recursion.
To compare and merge the subarrays to produce a sorted array.
Which of the following best describes the result of a binary search on a sorted array that does not contain the target value?
The binary search will repeatedly halve the search interval until it determines the target value is not present.
The binary search algorithm will loop infinitely because it expects to find every searched value.
The binary search will modify the array by sorting it again before concluding that the target is missing.
The binary search will continue to search until it reaches the end of the array and return -1.
Which algorithm would likely be the most efficient for searching a sorted list of 1 million integers to determine if it contains the integer 742?
Bubble sort followed by linear search.
Linear search.
Binary search.
Selection sort followed by binary search.
What is the name of the method used in Java to initialize objects when they are created?
Setter Method
Constructor
Object Function
Initializer Block

How are we doing?
Give us your feedback and let us know how we can improve
Which sorting algorithm is based on the divide-and-conquer approach?
Selection sort
Merge sort
Linear search
Insertion sort
What would be the consequence for recursion depth if a ternary search tree's insertion method was modified such that nodes have up-to four child references organized by quartiles rather than thirds?
Potentially deeper recursion due decreased node fill-rate prior balancing adjustments.
Faster insertions overall owing parallelizable nature quartile divisions.
Increased memory usage due requiring additional pointers per node.
Reduced recursion depth increased branching factor leads higher efficiency.
How many times is the find specific item within a binary tree called recursively, assuming the tree is balanced and every node has two children?
Equal to the height plus one.
Once per level traversed.
For each node in the entire structure.
Twice the total number of nodes.