Algochallenges
87 subscribers
1 link
Daily algorithm questions with explanations. Prepare for your next coding interview!
Download Telegram
In a max-heap, element with the greatest key is always in the which node?
Anonymous Quiz
18%
Leaf node
28%
First node of left sub tree
50%
Root node
5%
First node of right sub tree
What is the complexity of adding an element to a heap?
Anonymous Quiz
43%
O(logn)
27%
O(h)
18%
O(logn) & O(h)
11%
O(n)
The worst case complexity of deleting any arbitrary node value element from heap is __________
Anonymous Quiz
38%
O(logn)
15%
O(n)
26%
O(nlogn)
21%
O(n^2)
A heap can be used as ________________
Anonymous Quiz
54%
Priority queue
37%
Stack
7%
A decreasing order array
2%
A normal array
An array consists of n elements. We want to create a heap using the elements. The time complexity of building a heap will be in order of
Anonymous Quiz
15%
O(n*n*logn)
58%
O(n*logn)
15%
O(n*n)
12%
O(n *logn *logn)
If several elements are competing for the same bucket in the hash table, what is it called?
Anonymous Quiz
8%
Diffusion
8%
Replication
80%
Collision
5%
Duplication
In simple uniform hashing, what is the search complexity?
Anonymous Quiz
14%
O(n)
43%
O(logn)
9%
O(nlogn)
34%
O(1)
What is the number of edges present in a complete graph having n vertices?
Anonymous Quiz
24%
(n*(n+1))/2
58%
(n*(n-1))/2
15%
n
3%
Information given is insufficient
A connected planar graph having 6 vertices, 7 edges contains _____________ regions.
Anonymous Quiz
44%
15
33%
3
4%
1
19%
11
If a simple graph G, contains n vertices and m edges, the number of edges in the Graph G'(Complement of G) is ___________
Anonymous Quiz
39%
(n*n-n-2*m)/2
35%
(n*n+n+2*m)/2
9%
(n*n-n-2*m)/2
17%
(n*n-n+2*m)/2
What is the maximum number of edges in a bipartite graph having 10 vertices?
Anonymous Quiz
34%
24
41%
21
14%
25
10%
16
For a given graph G having v vertices and e edges which is connected and has no cycles, which of the following statements is true?
Anonymous Quiz
12%
v=e
48%
v=e+1
12%
v+1=e
28%
v=e-1
For which of the following combinations of the degrees of vertices would the connected graph be eulerian?
Anonymous Quiz
32%
1,2,3
14%
2,3,4
14%
2,4,5
39%
1,3,5