FreeJobAlert.Com

Government Jobs | Results | Admit Cards

Data Structures Question and Answers | Part5

If you would like to view All Data Structures interview questions only, at one place, visit below link
All Data Structures Interview Questions

41. What is the type of the algorithm used in solving the 8 Queens problem?
Ans: Backtracking

42. In an AVL tree, at what condition the balancing is to be done?
Ans: If the ‘pivotal value’ (or the ‘Height factor’) is greater than 1 or less than –1.

43. There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a full binary tree?
Ans: 15
In general:
There are 2n-1 nodes in a full binary tree.

By the method of elimination:
Full binary trees contain odd number of nodes. So there cannot be full binary trees with 8 or 14 nodes, so rejected. With 13 nodes you can form a complete binary tree but not a full binary tree. So the correct answer is 15.
Note: Full and Complete binary trees are different. All full binary trees are complete binary trees but not vice versa.

44. In RDBMS, what is the efficient data structure used in the internal storage representation?
Ans: 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.

Ans:
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?
Ans: 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?
Ans: 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?
Ans: According to Storage Linked List is a Non-linear one.

Related Fresher Interview Questions

1. C Language Interview Questions
2. C++ Language Interview Questions
3. Data Structures Interview Questions
4. DBMS Interview Questions
5. Operating System Interview Questions
6. UNIX Interview Questions

Tags: Data Structure, data structure interview questions, data structure placement papers, data structure placement questions, data structure question answer, data structure questions, data structure questions and answers, data structure questions for freshers, data structure questions for interview, data structure questions interview, Data structures, data structures in c, interview questions and answers for data structure, interview questions and answers for freshers, interview questions for data structures, interview questions on data structures

Responses to “Data Structures Question and Answers | Part5”

  1. please send me sir interview questions

Leave a Comment