Monday, July 27, 2015

Data Structures solved question and answers

1. What is Data structure?

Ans.: The logical or mathematical representation of data.
It is way of organizing data that considers the data stored and also their relationship with each other.

2. Applications of data structures in computer science
Ans.: Compiler design
DBMS
Artificial intelligence
Statistical analysis
Numerical analysis
Graphics
Operating system
Simulation

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


 Ans.: Two
Explanation: One queue for actual storing of data and another queue for storing priorities.

4. Arithmetic expressions cam be evaluated using
Ans.: Polish and reverse polish notations.

5. Methods used to store sequential files
Ans.: Straight merging
Polyphase sort
Distribution of initial runs.
Natural merging

6. How many different trees possible with 7 nodes. 
Ans.: 121
Explanation: 2^n-n
2^7-7=128-7=121

7. Which is the condition that occurs when two distinct key values are mapped to the same memory location.
Ans.: Collision


8. Simplest file structure is

Ans.: Sequential file structure

9. What is computational procedure
Ans.: An algorithm that does not terminate.
Example: Operating System

10. 8 queens problem can be solved by
Ans.: Backtracking method.

11. Which is the memory address of the first element of the array.
Base address.

12. Stack is also called as
Push down list.

13. A descending heap is also called as
Max heap

14. A linked list with no nodes is called as
Empty list or null list.

15. A strictly binary tree with n leaves have how many nodes.
2n-1 nodes



16. Which is the most commonly used hash functions to compute hash address.

Division method

17. Which graph shows basic blocks and the success of relationships
Flow graph

18.  Commonly used language processors are
Compilers
Interpreters
Assembler

19. In queue, the end from which data is inserted is called as
Rear

20. Through linked list, we can implement
Stack, queue, graph

21. Number of arcs incident to a node is called as
Predecessor

22. Methods of graph traversal
Depth First Search(DFS)
Breadth First Search(BFS)

23. Representation of two dimensional array in memory is called as
Row-major and column-major

24. A heap allows very efficient implementation of 
Priority queue

25. The shortest path in weighted graph or network is found out using
Dijkastra's algorithm
Kruskal algorithm

26. The smallest element of a array is called as
Lower bound.

No comments:

Post a Comment