Logo

Algorithms Questions Set 7:

Quiz Mode

What is the value of the postfix expression 7 3 6 4 + - *?

1
2
3
4

Solution:

Can a stack be described as a pointer?

1
2
3
4

Solution:

Suppose T1(n) = O(f(n)) and T2(n) = O(f(n)), which of the following is true?

1
2
3
4

Solution:

What is the condition for a matrix to be considered a sparse matrix?

1
2
3
4

Solution:

Which one of the following hash functions on integers will distribute keys most uniformly over 10 buckets numbered 0 to 9 for i ranging from 0 to 2020?

1
2
3
4

Solution:

The worst-case time complexity of insertion sort is O(n2). What will be the worst-case time complexity of insertion sort if the correct position for the inserting element is calculated using binary search?

1
2
3
4

Solution:

What is a maximum bipartite matching?

1
2
3
4

Solution:

What are the updated values of h and l in the array if the element being searched is greater than the value at the calculated index in interpolation search? (p = current position)

1
2
3
4

Solution:

The most appropriate matching for the following pairs:

A: Sorting                                                                 1: Stack

B: Depth-First Search                                            2: Queue

C: Breadth-First Search                                         3: Heap

1
2
3
4

Solution:

Which of the properties hold for the adjacency matrix A of a simple undirected unweighted graph having n vertices? 

1
2
3
4

Solution: