Skip to content

Tag Archives: GATE-CS-2016 (Set 2)

The number of ways in which the numbers 1, 2, 3, 4, 5, 6, 7 can be inserted in an empty binary search tree, such… Read More
The given diagram shows the flowchart for a recursive function A(n). Assume that all statements, except for the recursive calls, have O(1) time complexity. If… Read More
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.… Read More
Consider the following program: int f(int *p, int n) {     if (n <= 1) return 0;     else return max(f(p+1,n-1),p[0]-p[1]); } int main() {     int a[]… Read More
Consider the following New-order strategy for traversing a binary tree: Visit the root; Visit the right subtree using New-order Visit the left subtree using New-order… Read More
The following function computes XY for positive integers X and Y. int exp(int X, int Y) {     int res = 1, a = X, b… Read More
A complete binary min-heap is made by including each integer in [1, 1023] exactly once. The depth of a node in the heap is the… Read More
Consider a 3 GHz (gigahertz) processor with a three-stage pipeline and stage latencies v1, v2, and v3 such that v1 = 3v2/4 = 2v3. If… Read More
The width of the physical address on a machine is 40 bits. The width of the tag field in a 512 KB 8-way set associative… Read More
Consider a processor with 64 registers and an instruction set of size twelve. Each instruction has five distinct fields, namely, opcode, two source register identifiers,… Read More
Suppose the functions F and G can be computed in 5 and 3 nanoseconds by functional units UF and UG, respectively. Given two instances of… Read More
The value of the expression 1399(mod 17), in the range 0 to 16, is :   Note : This question was asked as Numerical Answer… Read More
Consider a set U of 23 different compounds in a Chemistry lab. There is a subset S of U of 9 compounds, each of which… Read More
Which one of the following well-formed formulae in predicate calculus is NOT valid? (A) A (B) B (C) C (D) D Answer: (D) Explanation: Suppose… Read More
A binary relation R on N x N is defined as follows: (a, b) R (c, d) if a <= c or b <= d.… Read More

Start Your Coding Journey Now!