|
Technical Sample Questions : C |
C++ |
Oracle |
Java | Unix |
Operating Systems |
Data Structure
Tecnical Sample Questions
Data Structure Sample Questions
- Convert the expression ((A + B) * C - (D - E) ^ (F + G)) to equivalent Prefix and Postfix notations.
Answer:
Prefix Notation: ^ - * +ABC - DE + FG
Postfix Notation: AB + C * DE - - FG + ^
- How many null branches are there in a binary tree with 20 nodes?
Answer: 21
Let us take a tree with 5 nodes (n=5)
It will have only 6 (ie,5+1) null branches.
A binary tree with n nodes has exactly n+1 null nodes.
- What are the methods available in storing sequential files?
Answer: The methods available in storing sequential files are:
- Straight merging,
- Natural merging,
- Polyphase sort,
- Distribution of Initial runs.
- How many different trees are possible with 10 nodes ?
Answer:
1014
For example, consider a tree with 3 nodes(n=3), it will have the maximum combination of 5 different (ie, 23 - 3 = 5) trees.

i ii iii iv v
In general:
If there are n nodes, there exist 2n-n different trees.
- List out few of the Application of tree data-structure?
Answer: The list is as follows:
- The manipulation of Arithmetic expression,
- Symbol Table construction,
- Syntax analysis.
- List out few of the applications that make use of Multilinked Structures?
Answer: The applications are listed below:
- Sparse matrix,
- Index generation.
- In tree construction which is the suitable efficient data structure?
Answer: Linked list is the efficient data structure.
- What is the type of the algorithm used in solving the 8 Queens problem?
Answer:
Backtracking
« Previous || Next »
Data structure Sample Question Number :
1-7|
8-15|
16-21|
22-29|
30-32
|
|