# Tag Archives: GATE-CS-2005

## GATE | GATE-CS-2005 | Question 45

Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2 is undecidable. Which one of the following is… Read More »

## GATE | GATE-CS-2005 | Question 44

What is the minimum number of ordered pairs of non-negative numbers that should be chosen to ensure that there are two pairs (a, b) and… Read More »

## GATE | GATE-CS-2005 | Question 43

Let f: B → C and g: A → B be two functions and let h = f o g. Given that h is an… Read More »

## GATE | GATE-CS-2005 | Question 42

Let R and S be any two equivalence relations on a non-empty set A. Which one of the following statements is TRUE? (A) R ∪… Read More »

## GATE | GATE-CS-2005 | Question 41

What is the first order predicate calculus statement equivalent to the following? Every teacher is liked by some student (A) ∀(x) [teacher (x) → ∃… Read More »

## GATE | GATE-CS-2005 | Question 40

Let P, Q and R be three atomic prepositional assertions. Let X denote (P v Q) → R and Y denote (P → R) v… Read More »

## GATE | GATE-CS-2005 | Question 39

Suppose there are ⌈ log n ⌉ sorted lists of ⌊ n/log n ⌋ elements each. The time complexity of producing a sorted list of… Read More »

## GATE | GATE-CS-2005 | Question 38

Let G(V, E) an undirected graph with positive edge weights. Dijkstra’s single-source shortest path algorithm can be implemented using the binary heap data structure with… Read More »

## GATE | GATE-CS-2005 | Question 37

Suppose T(n) = 2T (n/2) + n, T(0) = T(1) = 1 Which one of the following is FALSE? (A) T(n) = O(n2) (B) T(n)… Read More »

## GATE | GATE-CS-2005 | Question 36

In a complete k-ary tree, every internal node has exactly k children. The number of leaves in such a tree with n internal nodes is… Read More »

## GATE | GATE-CS-2005 | Question 35

How many distinct binary search trees can be created out of 4 distinct keys? (A) 5 (B) 14 (C) 24 (D) 42 Answer: (B) Explanation:… Read More »

## GATE | GATE-CS-2005 | Question 34

A Priority-Queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is given below: 10, 8, 5, 3,… Read More »

## GATE | GATE-CS-2005 | Question 33

Postorder traversal of a given binary search tree T produces the following sequence of keys 10, 9, 23, 22, 27, 25, 15, 50, 95, 60,… Read More »

## GATE | GATE-CS-2005 | Question 32

Consider the following C-program: filter_none edit close play_arrow link brightness_4 code double foo (double); /* Line 1 */    int main() {        double da,… Read More »

## GATE | GATE-CS-2005 | Question 31

Consider the following C-program: filter_none edit close play_arrow link brightness_4 code void foo(int n, int sum) {   int k = 0, j = 0;   if… Read More »