Search Box

Data Structures Interview Questions with Answers

Data-Structures-Interview-Questions-with-Answers

Q) What is data structure?
ANS:A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the manipulation of data

Q)Which data structure is used to perform recursion?
ANS:Stack

Q)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.






Q)Whether Linked List is linear or Non-linear data structure?
ANS:According to Access strategies Linked list is a linear one.
According to Storage Linked List is a Non-linear one.


Q)Define leaf?
ANS:The node without any child node is a leaf node.

Q)What do you mean by overflow and underflow?
ANS:Overflow: When there is no more room to store new elements
Underflow: When there are no more elements to be deleted


Q)What is binary search tree?
ANS:The tree constructed using the relationship as Left Child < Root < Right Child"

Q). In tree construction which is the suitable efficient data structure? (Array, Linked list, Stack,
Queue)

ANS:Array or Linked List

Q) What is difference between Singly Linked List and Doubly Linked List data structure?
ANS:Singly list: Each node can point only to next node
Doubly list: Each node can point to previous node as well as next node -- Exceptions for first and last nodes in each case


Q) What is Huffman’s algorithm?
ANS:- It is used in creating extended binary trees that have minimum weighted path lengths from the given weights.
- It makes use of a table that contains frequency of occurrence for each data element.






Q)Some of the applications of stack are as follows:
ANS: Function calls.
Reversal of a string.
Checking validity of an expression containing nested parenthesis.
Conversion of infix expression to postfix.


Q)What if the time complexity of binary search?
ANS:Log n

Q)Can binary search be applied to linked list?
ANS:No

Q) When is a binary search algorithm best applied and when is linear search?
ANS:Binary Search - In case the data items are already sorted Linear Search





Study Material @ Placement Papers Hub



    Data Structures Interview Questions with Answers Data Structures Interview Questions with Answers Reviewed by @NA on 7:31:00 PM Rating: 5

    No comments:

    Placement Papers Hub. Powered by Blogger.