GATE CSE · Computer Science and Information Technology
C programming; recursion; arrays, stacks, queues, linked lists, trees, BSTs, heaps and graphs.
Test yourself on Programming and Data Structures
5 real GATE CSE questions with instant answers — no signup, ~3 minutes.
Study notes are still being prepared.
Don't wait — Shishya can teach you this topic right now, on demand.
Ask Shishya to teach this →Shishya is your personal tutor for this topic. Pick a starter or open a free chat.
Q1 · Programming and Data Structures · MEDIUM
What is the time complexity of inserting an element at the beginning of a doubly linked list?
Q2 · Programming and Data Structures · HARD
A binary search tree (BST) is constructed by inserting the keys 50, 30, 70, 20, 40, 60, 80 in that order. How many nodes are in the left subtree of the root?
Q3 · Programming and Data Structures · MEDIUM
A binary search tree (BST) is constructed by inserting the keys 45, 30, 60, 20, 35, 50, 70 in that order. What is the height of the resulting BST (considering a single-node tree has height 0)?
Q4 · Programming and Data Structures · MEDIUM
A binary search tree (BST) is created by inserting keys in the order: 50, 30, 70, 20, 40, 60, 80. How many nodes will be visited during a search for the key 65 in this BST?
Q5 · Programming and Data Structures · EASY
What is the output of the following C code snippet? int arr[5] = {10, 20, 30, 40, 50}; int *ptr = arr + 2; printf("%d", *(ptr + 1));