GATE CS Arrays, Stacks and Queues questions
Practise Arrays, Stacks and Queues questions for GATE CS. Explore official PYQs and original topic-wise quizzes, check answers and view available solutions. Free, no sign-in.
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.
9 on this page
Let be a two dimensional array declared as follows: A: array [1 …. 10] [1 ….. 15] of integer; Assuming that each integer takes one memory location, the array is stored in row-major order and the first element of the array is stored at location , what is the address of the element ?
A priority queue is used to implement a stack that stores characters. PUSH (C) is implemented as INSERT where is an appropriate integer key chosen by the implementation. POP is implemented as DELETEMIN. For a sequence of operations, the keys chosen are in
Which of the following is essential for converting an infix expression to the postfix form efficiently?
An advantage of chained hash table (external hashing) over the open addressing scheme is
Consider the following statements: First-in-first out types of computations are efficiently supported by STACKS. Implementing LISTS on linked lists is more efficient than implementing LISTS on an array for almost all the basic LIST operations. Implementing QUEUES on a circular array is more efficient than implementing QUEUES on a linear array with two …
The postfix expression for the infix expression is:
Which of the following permutations can be obtained in the output (in the same order) using a stack assuming that the input is the sequence in that order?
In a compact single dimensional array representation for lower triangular matrices (i.e all the elements above the diagonal are zero) of size , non-zero elements, (i.e elements of lower triangle) of each row are stored one after another, starting from the first row, the index of the element of the lower triangular matrix in this …
The following sequence of operations is performed on a stack: The sequence of values popped out is
