Data Structures and C Programming



Data Structures Interview Questions

Pg : 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

"Programming is an art form that fights back"

Data Structures Interview Questions - Page 12

In a heap, element with the greatest key is always in the ___________ node

Ans: root

In _____________tree, the heights of the two child subtrees of any node differ by at most one

Ans: AVL tree

What is the minimum number of queues needed to implement the priority queue?

Two. One queue is used for the actual storing of data, and the other one is used for storing the priorities.

A binary tree with 20 nodes has null branches?

34 Let us take a tree with 5 nodes (n=5)
It will have only 6 (ie,5+1) null branches. In general,
A binary tree with n nodes has exactly n+1 null nodes

What are some of the applications for the tree data structure?

1- Manipulation of the arithmetic expressions.
2- Symbol table construction.
3- Syntax analysis.

Which data structures algorithm used in solving the eight Queens problem?


Classify the Hashing Functions based on the various methods by which the key

value is found.
_ Direct method,
_ Subtraction method,
_ Modulo-Division method,
_ Digit-Extraction method,
_ Mid-Square method,
_ Folding method,
_ Pseudo-random method