GATE CS Programming and Data Structures questions
Practise Programming and Data Structures questions for GATE CS. Explore official PYQs and original subject-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.
18 on this page
The postfix expression for the infix expression is:
A binary tree has leaf nodes. The number of nodes of degree in is
Consider the following recursive function: function fib (n:integer);integer; begin if (n=0) or (n=1) then fib := 1 else fib := fib(n-1) + fib(n-2) end; The above function is run on a computer with a stack of bytes. Assuming that only return address and parameter are passed on the stack, and that an integer value and an address takes bytes each, …
Linked lists are not suitable data structures for which one of the following problems?
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 …
An unrestricted use of the "" statement is harmful because
In which of the following cases is it possible to obtain different results for call-by-reference and call-by-name parameter passing methods?
A tree is such that All internal nodes have either or children All paths from root to the leaves have the same length The number of internal nodes of a tree having leaves could be
The following sequence of operations is performed on a stack: The sequence of values popped out is
Consider the following recursive definition of : fib(n) := if n = 0 then 1 else if n = 1 then 1 else fib(n-1) + fib(n-2) The number of times is called (including the first call) for evaluation of is___________.
The weighted external path length of the binary tree in figure is ______
The total external path length, of a binary tree with external nodes is, , where is the path length of external node ),
Which one of the following statements (s) is/are FALSE?
An unrestricted use of the "go to" statement is harmful because of which of the following reason (s):
State whether the following statements are TRUE or FALSE: If the number of leaves in a tree is not a power of then the tree is not a binary tree.
State whether the following statements are TRUE or FALSE: It is possible to construct a binary tree uniquely whose pre-order and post-order traversals are given?
In a circular linked list organization, insertion of a record involves modification of
