Skip to content
Gblog Must Do Coding Questions for Product Based Companies
As the placement season is back, Geeksforgeeks is here to help you crack the interview. We have selected some most commonly asked and MUST DO… Read More
February 15, 2021
Suppose T(n) = 2T(n/2) + n, T(0) = T(1) = 1 Which one of the following is false. ( GATE CS 2005) a) T(n) =… Read More
Which of the following tree traversal uses a queue data structure? (A) Preorder (B) Inorder (C) Postorder (D) Level order Answer: (D) Explanation: Level order… Read More
Which traversal of tree resembles the breadth first search of the graph? (A) Preorder (B) Inorder (C) Postorder (D) Level order Answer: (D) Explanation: Breadth… Read More
Which of the following traversal outputs the data in sorted order in a BST? (A) Preorder (B) Inorder (C) Postorder (D) Level order Answer: (B)… Read More
Suppose there is a circle. There are n petrol pumps on that circle. You are given two sets of data. The amount of petrol that… Read More
Which of the following is not a backtracking algorithm? (A) Knight tour problem (B) N queen problem (C) Tower of hanoi (D) M coloring problem… Read More
The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of (A) N (B) N^2… Read More
What is the worst case time complexity of insertion sort where position of the data to be inserted is calculated using binary search? (A) N… Read More
You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate? (A) Heap… Read More
What is the best time complexity of bubble sort? (A) N^2 (B) NlogN (C) N (D) N(logN)^2 Answer: (C) Explanation: The bubble sort is at… Read More
The number of tokens in the following C statement is (GATE 2000) printf("i = %d, &i = %x", i, &i); (A) 3 (B) 26 (C)… Read More
The C language is. (GATE CS 2002) (A) A context free language (B) A context sensitive language (C) A regular language (D) Parsable fully only… Read More
In the C language (GATE CS 2002) (A) At most one activation record exists between the current activation record and the activation record for the… Read More
Consider the following program fragment for reversing the digits in a given integer to obtain a new integer. Let n = D1D2…Dm int n, rev; … Read More
Consider the following C program int main()  {     int x, y, m, n;     scanf ("%d %d", &x, &y);     /* x > 0 and y >… Read More