You are given an array with even integer elements. You and some other player take turns to pick numbers. Each player can pick either the… Read More

# Tag Archives: Misc

Which of the following data structures is best suited for efficient implementation of priority queue? (A) Array (B) Linked List (C) Heap (D) Stack Answer:… Read More

Consider a situation where a client receives packets from a server. There may be differences in speed of the client and the server. Which data… Read More

Which data structure is best suited for converting recursive implementation to iterative implementation of an algorithm? (A) Queue (B) Stack (C) Tree (D) Graph Answer:… Read More

Which of the following is the best possible time complexity to get Nth Fibonacci number with O(1) extra space (A) Time complexity T(n) is T(n-1)… Read More

There are 25 horses among which you need to find out the fastest 3 horses. You can conduct race among at most 5 to find… Read More

Which among the following data structures is best suited for storing very large numbers (numbers that cannot be stored in long long int). Following are… Read More

Which of the following best describes C language (A) C is a low level language (B) C is a high level language with features that… Read More

In the above question, if array A is made to hold the string “abcde”, which of the above four test cases will be successful in… Read More

The procedure given below is required to find and replace certain characters inside an input character string supplied in array A. The characters to be… Read More

An inversion in a an array A[] is a pair (A[i], A[j]) such that A[i] > A[j] and i < j. An array will have… Read More

The most appropriate matching for the following pairs X: depth first search 1: heap Y: breadth-first search 2: queue Z: sorting 3: stack is (GATE… Read More

A data structure is required for storing a set of integers such that each of the following operations can be done in (log n) time,… Read More

The best data structure to check whether an arithmetic expression has balanced parentheses is a (GATE CS 2004) (A) queue (B) stack (C) tree (D)… Read More

Suppose you are given an array s[1…n] and a procedure reverse (s,i,j) which reverses the order of elements in a between positions i and j… Read More