Time Left - 12:00 mins

BARC 2020: Algorithm Nuclear Quiz 2 (App update required to attempt this test)

Attempt now to get your rank among 946 students!

Question 1

Consider the hashing table with ‘m’ slots and ‘n’ keys. If the expected number of probes in unsuccessful search is 3 then value of load factor is ____.(upto 3 decimal places)

Question 2

Consider two function g(n) and h(n) which is given as g(n) = n and h(n) = nsin n , where n is a positive integer which of the following statement is correct

Statement 1- g(n) = O(h(n))

Statement 2- g(n) = (h(n))

Question 3

Consider the following symbols and their frequency in a specific document

After applying Huffman coding algorithm, the weighted external path length is _________.

Question 4

Which of the following is/are stable algorithms?

1) Bubble sort

2) merge sort

3) Heap sort

4) insertion sort

Question 5

Consider the following statements with respect to Quick sort algorithm

Statement 1- Quick sort algorithm’s worst case space complexity is O(log n) where n is the number of elements to be sorted.

Statement 2- Good implementation of quick sort algorithm is faster than Heap sort.

Statement 3- Stability depends in how the pivot is handled.

Number of statements that are incorrect is

Question 6

Let A1, A2, A3, and A4 be four matrices of dimensions 10 x 5, 5 x 20, 20 x 10, and 10 x 5, respectively. The minimum number of scalar multiplications required to find the product A1A2A3A4 using the basic matrix multiplication method is

Question 7

Find the complexity T(n) for the following recurrence relation.

T(n) = T(n/5) + T(n/6) + T(n/8) + c

i) O(nlog53) ii) Ω(nlog53) iii) O(nlog83) iv) Ω(nlog83) v) O(nlog63)

Question 8

Consider the following C program:

If the time complexity is O(nalog2b), then find the value of a*2.5 + b* 3?

MA stands for matrix addition of order n.

Question 9

Consider the following Graph :

Which of the following is not the correct Breadth first traversal of the given graph?

Question 10

Consider a sequence of 10 elements:

S = [-4, 6, -2, 3, -9,  8, -1, -7, 5]. The subsequence sum B (i, j) = . Determine the maximum of B (i. j), where 0 ≤ i < j.

  • 946 attempts