GATE CS question library
Practise GATE CS Computer Science previous year questions free. Browse by subject, syllabus topic, year and question type, with answers and available solutions.
Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.
20 on this page
The given diagram shows the flowchart for a recursive function . Assume that all statements, except for the recursive calls, have time complexity. If the worst case time complexity of this function is , then the least possible value (accurate up to two decimal positions) of is ________. Flow chart for Recursive …
The following function computes for positive integers and . int exp (int X, int Y) { int res =1, a = X, b = Y; while (b != 0) { if (b % 2 == 0) {a = a * a; b = b/2; } else {res = res * a; b = b - 1; } } return res; } Which one of the following conditions is TRUE before every iteration of the loop?
Consider a bits/second satellite communication link with one way propagation delay of milliseconds. Selective retransmission (repeat) protocol is used on this link to send data with a frame size of kilobyte. Neglect the transmission time of acknowledgement. The minimum number of bits required for the sequence number field to …
Consider a non-negative counting semaphore . The operation decrements , and increments . During an execution, operations and operations are issued in some order. The largest initial value of for which at least one operation will remain blocked is _______
Consider an eight-bit ripple-carry adder for computing the sum of and , where and are integers represented in 's complement form. If the decimal value of is one, the decimal value of that leads to the longest latency for the sum to stabilize is ___________
Consider the following types of languages: : Regular, : Context-free, : Recursive, : Recursively enumerable. Which of the following is/are TRUE ? is recursively enumerable. is recursive. is context-free. …
Identify the correct sequence in which the following packets are transmitted on the network by a host when a browser requests a webpage from a remote server, assuming that the host has just been restarted.
Let be a polynomial and be its derivative. If the degree of is , then the degree of is __________.
The Floyd-Warshall algorithm for all-pair shortest paths computation is based on
Consider the following expressions: The number of expressions given above that are logically implied by is ___________.
B+ Trees are considered BALANCED because.
The value printed by the following program is _______. void f (int * p, int m) { m = m + 5; *p = *p + m; return; } void main () { int i=5, j=10; f (&i, j); printf ("%d", i+j); }
Breadth First Search (BFS) is started on a binary tree beginning from the root vertex. There is a vertex at a distance four from the root. If is the vertex in this BFS traversal, then the maximum possible value of is __________
The number of states in the minimum sized DFA that accepts the language defined by the regular expression. is ________.
Assume that the algorithms considered here sort the input sequences in ascending order. If the input is already in the ascending order, which of the following are TRUE? Quicksort runs in time Bubblesort runs in time Mergesort runs in time Insertion sort runs in time
In which one of the following page replacement algorithms it is possible for the page fault rate to increase even when the number of allocated frames increases?
items are stored in a sorted doubly linked list. For a delete operation, a pointer is provided to the record to be deleted. For a decrease-key operation, a pointer is provided to the record on which the operation is to be performed. An algorithm performs the following operations on the list in this order: delete, …
Anarkali digitally signs a message and sends it to Salim. Verification of the signature by Salim requires.
The minimum number of colours that is sufficient to vertex-colour any planar graph is ________.
Suppose a database schedule involves transactions . Construct the precedence graph of with vertices representing the transactions and edges representing the conflicts. If is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?
