• +91 9971497814
  • info@interviewmaterial.com

Data structure Interview Questions Answers

Question 1 : Which process places data at the back of the queue?

Answer 1 : Enqueue is the process that places data at the back of the queue.

Question 2 : What does each entry in the Link List called?

Answer 2 : Each entry in a linked list is called a node. Think of a node as an entry that has three sub entries. One sub entry contains the data, which may be one attribute or many attributes. Another points to the previous node, and the last points to the next node. When you enter a new item on a linked list, you allocate the new node and then set the pointers to previous and next nodes.

Question 3 : What is Linked List ?

Answer 3 : Linked List is one of the fundamental data structures. It consists of a sequence of? nodes, each containing arbitrary data fields and one or two (”links”) pointing to the next and/or previous nodes. A linked list is a self-referential datatype because it contains a pointer or link to another data of the same type. Linked lists permit insertion and removal of nodes at any point in the list in constant time, but do not allow random access.

Question 4 : What member function places a new node at the end of the linked list?

Answer 4 : The appendNode() member function places a new node at the end of the linked list. The appendNode() requires an integer representing the current data of the node.

Question 5 : How is any Data Structure application is classified among files?

Answer 5 : A linked list application can be organized into a header file, source file and main application file. The first file is the header file that contains the definition of the NODE structure and the LinkedList class definition. The second file is a source code file containing the implementation of member functions of the LinkedList class. The last file is the application file that contains code that creates and uses the LinkedList class.

Question 6 : What is data structure?

Answer 6 : 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.

Question 7 : What is the data structures used to perform recursion?

Answer 7 : Stack. Because of its LIFO (Last In First Out) property it remembers its caller, so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.

Question 8 : What are the methods available in storing sequential files ?

Answer 8 : Straight merging, Natural merging,  Polyphase sort, Distribution of Initial runs.

Question 9 : List out few of the Application of tree data-structure?

Answer 9 : The manipulation of Arithmetic expression, Symbol Table construction, Syntax analysis.

Question 10 : In RDBMS, what is the efficient data structure used in the internal storage representation?

Answer 10 : 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.

Data structure Contributors


Share your email for latest updates


Our partners