Data structure
Description: Data structure questions for GATE aspirants | |
Number of Questions: 25 | |
Created by: Amit Pandey | |
Tags: Data-Structure Programming and Data Structures Computer Science & Information Technology - CS |
How many null branches are there in a binary tree with 20 nodes?
The total number of binary trees possible with three unlabelled nodes is
Which one of the following sorting algorithms is using divide and conquer method?
For height H and root at level 0, how many number of nodes will be there in a binary tree?
For static memory location which of the following data structures is used?
Insert the following elements as binary search tree, 10, 11, 12, 13, 14, 15, 16, 17 and build AVL tree.
Which of the following data structures allows deletion of element from both the ends and insertion at only one end?
In-order traversal of a tree will yield a sorted list of elements of tree in
For height H and root at level 1, how many number of nodes will be there in a binary tree?
Which of the following data structures is used to perform recursion?
Identify the correct sequence for stack, if the input sequence is 1, 2, 3, 4 and 5.
Which of the following data structures is used for locating memory at run time?
Calculate the number of distinct trees possible for 5 unlabelled NODE.
Which of the following is not self referential structure?
A link list contains following items:
The first item in link list is A, second is B, third is C, fourth is D and fifth is E. Here, A is pointing to B, B is pointing to C, C is pointing to D and D is pointing to E and E is the last item. Its link part contains NULL. What will be the output after the following sequence of steps? (First is the pointer pointing to first element)
- struct NODE*P;
- P=First->next->next;
- First->next->next=P->next;
- P->next->next=P;
- printf(%d,First->next->next->next->info);
Calculate the minimum number of nodes in AVL tree where height (H) is 8 and root at level 1.
If A [2] [2] [2] contains element 1 2 3 4 5 6 7 8. Then A [0] [0] [1] contains which element?
From which end of queue, elements are deleted?
In stack, insertion of element takes place from which end?
The In-order traversal of a tree is given as B C A E D F and pre-order traversal of tree is given as A B C D E F. What will be the post order traversal order?
In queue, from which end elements are inserted?
If a binary search tree contains numbers and tree is traversed in order then in which order, numbers will be printed?
If a binary tree contains either two or zero children, then it is called as
Fill in the blank. Where 'i' is the stack no. and 'x' is the item to be inserted.
void Push( int i, int x ) {
if(-------) printf(Stackoverflow); elseS[++Top]=x;
}
Fill in the blank in the following code, where DOM is counting the number of nodes in link list.
int DOM() {
struct NODE *M= First;
int count=0;
while( _____ ) {
++count;
P=P->next; }
return count;
}