Signup/Sign In

Data Structure and Algo Questions

This Test will cover basic concepts of data Structure and related algorithm.
Q. N queens puzzle problem is a typical implementation of which of the following algorithm?
Q. What is the time complexity required to sort the below list of elements using quick sort?
0 00000000
Q. What is the total number of subsequences possible for the string "STUDY_TONIGHT"?

Q. What is the time complexity of finding minimum number of matrix multiplications required for a given sequence of matrices using dynamic programming?
Q. What is the number of ways in which three matrices A1, A2, A3 and A4 can be multiplied?
A1 = 10 X 20
A2 = 20 X 15
A3 = 15 X20
A4 = 20 X 20
Q. Complete the following psudo code for generating Fibonacci Series:
        return 0; 
        return 1;
    return (__________);
Q. Consider the following recurrence relation to generate Fibonacci series:
f(n) = f(n-1) + f(n-2), when n >= 2
f(n) = 1, when n=1
f(n) = 0, when n=0
What is the total number of function calls when F(5) is called?
Q. What is the time complexity to find the minimum element in min heap?

Q. What is the time complexity of an algorithm whose recurrence relation is given below:
T(n) = 8 T(n/3) + n2
Q. What is the space complexity of the below psudo code?
F(Arr[], 1, n)
    int I;
    Create B[n];
    For(i=1 to n)
        B[i] = Arr[i];

Q. What is the total number of comparisons and movement required in the worst case of insertion sort to sort n elements?
Q. What is the maximum numbers of nodes present in complete binary tree?

Q. What is the expected result after first two passes of bubble sort(consider worst case possible) ?
Q. What is the output of the following code?

void main()
    string str[] = "Study_tonight";
    printf("%d", sizeof(str));
    printf("%d", strlen(str));
Q. Which of the following is the best choice for Hashing when we want to perform deletion operations on elements?

Related Tests: