Lecture 16, 18, 20

 0    23 kartičky    kapi2304
stáhnout mp3 Vytisknout hrát zkontrolovat se
 
otázka język polski odpověď język polski
Quick sort uses which of the following algorithm to implement sorting?
začněte se učit
divide and conquer
What is a randomized quick sort?
začněte se učit
quick sort with random choice of pivot
What is the auxiliary space complexity of randomized quick sort?
začněte se učit
O(log n)
What is the average time complexity of randomized quick sort?
začněte se učit
O(n log n)
Randomized quick sort is an in place sort.
začněte se učit
True
Randomized quick sort is a stable sort.
začněte se učit
False
What is the best case time complexity randomized quick sort?
začněte se učit
O(nlog n)
Which of the following is incorrect about randomized quicksort?
začněte se učit
it cannot have a time complexity of O(n^2) in any case
What is the worst case time complexity of randomized quicksort?
začněte se učit
O(n^2)
Using division method, in a given hash table of size 157, the key of value 172 be placed at position ____
začněte se učit
15
Collisions can be reduced by choosing a hash function randomly in a way that is independent of the keys that are actually to be stored
začněte se učit
True
What is the average retrieval time when n keys hash to the same slot?
začněte se učit
Theta(n)
What is a hash table?
začněte se učit
A data structure used to store key-value pairs
How does a hash table work?
začněte se učit
It uses a hash function to map keys to array indices
What is the time complexity of inserting an element in a hash table?
začněte se učit
O(1)
What is the worst-case time complexity of searching for an element in a hash table?
začněte se učit
O(n)
What happens if two keys hash to the same index in a hash table?
začněte se učit
A collision occurs
Depth First Search is equivalent to which of the traversal in the Binary Trees?
začněte se učit
Pre-order Traversal
Time Complexity of DFS is? (V – number of vertices, E – number of edges)
začněte se učit
O(V + E)
The Data structure used in standard implementation of Breadth First Search is?
začněte se učit
Queue
The Depth First Search traversal of a graph will result into?
začněte se učit
Tree
When the Depth First Search of a graph is unique?
začněte se učit
When the graph is a Linked List
In Depth First Search, how many times a node is visited?
začněte se učit
Equivalent to number of indegree of the node

Chcete-li přidat komentář, musíte se přihlásit.