end Flashcards
Which sorting algorithm uses the divide-and-conquer approach?
c.
Quick Sort
In a graph with multiple connected components, how many times will BFS be called?
d.
The number of connected components
when an algorithm generates the same address for different identifiers it is known as
a.
Collisions
What data structure is used in DFS to keep track of the visited nodes?
d.
Stack
The capacity and load factor are parameters that affect the Hash Table performance
True
Which of the following techniques can be used to search an element in an unsorted array?
b.
Iterative linear search
What is the worst case runtime of linear search algorithm?
b.
O(n)
Each class provides its own implementation of hashCode()
False
Which of the following sorting algorithm has best case time complexity of O(n^2)?
b.
selection sort
What is the minimum number of edges required for a connected undirected graph with n vertices?
c.
n-1
In a weighted graph, which of the following algorithms can be used to find the shortest path from a source node to all other nodes?
d.
Dijkstra’s algorithm
Which of the following sorting algorithms not has a worst-case time complexity of O(n^2)?
a.
Merge Sort
Object class contains hashCode() method with its default implementation
True
Selected pivot point can be only first element in quick sort.
False
Which of the following methods can be used to search an element in a linked list?
d.
Iterative linear search