Data Structures Viva Questions
Data Structures Viva Questions
Data Structures Viva Questions
The remaining nodes are partitioned into n>=0 subsets, each of which is a tree.
Degree of a node:
The number of sub trees attached to a node is called degree of that node andthe maximum degree of any node in a tree is
called
degree of that tree.
35. What are the notations used in Evaluation of Arithmetic Expressions using prefix and
postfix forms?
Polish and Reverse Polish notations.
36. Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix and
Postfix notations?
1.Prefix Notation:
^ – * +ABC – DE + FG
2.Postfix Notation:
AB + C * DE – – FG + ^
37. Sorting is not possible by using which of the following methods?
(a) Insertion
(b) Selection
(c) Exchange
(d) Deletion
(d) Deletion.
Using insertion we can perform insertion sort, using selection we can perform selection sort,
using exchange we can perform the bubble sort (and other similar sorting methods). But no
sorting method can be done just using deletion.
38. List out few of the Application of tree data-structure?
The manipulation of Arithmetic expression,
Symbol Table construction,
Syntax analysis.
39. List out few of the applications that make use of Multilinked Structures?
Sparse matrix, Index generation.
40. in tree construction which is the suitable efficient data structure?
(A) Array (b) Linked list (c) Stack (d) Queue (e) none
(b) Linked list
41. What is the type of the algorithm used in solving the 8 Queens problem?
Backtracking
42. In an AVL tree, at what condition the balancing is to be done?
If the ‘pivotal value’ (or the ‘Height factor’) is greater than 1 or less than –1.
43. In RDBMS, what is the efficient data structure used in the internal storage
representation?
B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searching easier.
This corresponds to the records that shall be stored in leaf nodes.
45. One of the following tree structures, which is, efficient considering space and time
complexities?
a) Incomplete Binary Tree.
b) Complete Binary Tree.
c) Full Binary Tree.
b) Complete Binary Tree.
By the method of elimination:
Full binary tree loses its nature when operations of insertions and deletions are done. For
incomplete binary trees,
extra property of complete binary tree is maintained even after operations like additions and
deletions are done on it.
46. What is a spanning Tree?
A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree
once. A minimum spanning tree is a spanning tree organized so that the total edge weight
between nodes is minimized.
47. Does the minimum spanning tree of a graph give the shortest distance between any 2
specified nodes?
No.Minimal spanning tree assures that the total weight of the tree is kept at its minimum. But it
doesn’t mean that the distance between any two nodes involved in the minimum-spanning tree is
minimum.
48. Whether Linked List is linear or Non-linear data structure?
According to Storage Linked List is a Non-linear one.