Consider an array consisting of –ve and +ve numbers. What would be the worst case time complexity of an algorithm to segregate the numbers having… Read More
Tag Archives: GATE 2017 Mock
You are given an array A[] having n random bits and a function OR(i,j) which will take two indexes from an array as parameters and… Read More
Consider a graph where all edge weights are positive. We have computed shortest path using Dijkstra’s shortest path algorithm and total weight of shortest path… Read More
You are given a graph containing n vertices and m edges and given that the graph doesn’t contain cycle of odd length. Time Complexity of… Read More
Given two Balanced binary search trees, B1 having n elements and B2 having m elements, what is the time complexity of the best known algorithm… Read More
Consider a binary min heap containing n elements and every node is having degree 2 ( i.e. full binary min heap tree). What is the… Read More
Consider the following C code int main() { int a = 300; char *b = (char *)&a; *++b = 2; printf("%d ",a); return 0; }… Read More
In Go–back 3 flow control protocol every 6th packet is lost. If we have to send 11 packets. How many transmissions will be needed ?… Read More
Consider a 3-stage pipeline with stage delay of 80, 70 and 90 ns respectively. Assume constant clock rate. What is the time taken to process… Read More
Which of the following is not true about data transfer using DMA controller. (A) Bus can be granted to DMA at the end of any… Read More
Consider n elements that are equally distributed in k stacks. In each stack, elements of it are arranged in ascending order (min is at the… Read More
How many antisymmetric relations are there on a set with n elements ? (A) 2n.3n(n-1)/2 (B) 2n (C) n2 (D) n Answer: (A) Explanation: Any… Read More
Let A = { 1,2,3,4,…….∞ } and a binary operation ‘+’ is defined by a + b = ab ∀ a,b ∈ A. Which of… Read More
Consider the problem of computing min-max in an unsorted array where min and max are minimum and maximum elements of array. Algorithm A1 can compute… Read More
A and B are two sets. If |A| = 5 , |B| = 3 , then, the number of onto functions from A to B… Read More