20 Data Structure Interview Questions and Answers

Data Structure Interview Questions and Answers

Experienced interviewers can ask you some basics about algorithm and data structure related subject. Then continue to further discussion and need that answers what you give. Basically data structure interview questions are designed in such a way that you will consider these very hard .As our experience they normally ask some basic interview questions and some practical related interview questions.

If you want to read for general knowledge of interviewers ask interview questions from electrical engineers then go here. If you want to know interview questions for fresh graduates then must read our previous article for fresh graduates. Hope these will also helpful and easy to understand.

Data structure interview questions are basically programming and algorithm related questions in which lot of coding and java related questions can be asked. So my advice is to prepare well and try to secure your post.

Data structures interview questions and algorithm interview questions are an important part of any programming job interview, may be it a Java interview, C++ interview or any other programming language?


Any type of programming and data structure interview questions are incomplete without questions from algorithms related topics. You need to know about the basic definition and introduction about Data structure and different exercises like swapping numbers without temp variable, linked list and array are important topics in any data structure interview.

But according to my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answer.

Here are some basic interview questions for your preparation that will make you successful in your data structure interview:

1: What is data structure?

Data structure is a way or process of defining, sorting, storing & retrieving of data in a structural & systematic way.

A data structure may contain different type of data items or may be it contains same type of data. So in data structure we are not focusing on same type we are also dealing different types of data.

2: How many types of data structures?

There are two types of data structures



3. What is linked list?

A linked list is a linear collection of data elements which is called nodes. Link List has no upper bound and no lower bound.

And also have no fix size. Free pool not allowed in link list. Each node has two parts first part hold information and second part hold address. The Linear order is given through pointers. Linked list is like a chain.

4. What is binary tree?

In data Structure Binary tree is a tree in which every node has two children’s which is called left and right child. Little number added on left side and greater number added on Right Side.

data structure interview questions and answers


5.What is Root?

No incoming edge is called Root.

6. What is Leaf?

A node have no child is called leaf.

7. What is the advantage of binary tree?

Binary tree provides fast searching and there is no insertion comparison. If every node has two children then we call it full binary tree.

8. What is queue?

A queue is an ordered collection of items in which data is inserted at the other end (rear) and deleted  from other end(Front end).It follows FIFO rules and there is no limit of entering items and get result.

9. What is LIFO in data structure?

LIFO stands for Last in First Out; it provides a way how to processed, retrieve and store data. Using LIFO scheme data that was stored last should be accessed first.

10. What is recursion?

Function calling it in a function is called recursion.

11. Briefly explain recursive algorithm.

Recursive algorithm divided a large or long problem into smaller parts or sub-programs. The output of one recursion part which is processed before becomes the input of next part.

12. What is Pointer?

In data structure, a memory which holds memory address is called pointer.

13. what is graph?

Set of edges and set of vertices’s is called graph.

14. Write applications of stack in data structure.

1: Parsing

2: Recursion

3: Calling function

4: Expression Evaluation

15. What is an AVL Tree in data structure?

AvL trees balance the height of binary search tree. AVL tree check the height of left and right sub tree and make sure that difference in not greater than one. The difference of left and right sub tree is called balance factor.

For example

Left-Right= Balance factor

16. What is hashing Table?

In hashing, data is stored and organized with the help of a table which is called hash table .Hash table is denoted by HT.

17. What are the criteria of algorithm analysis?

An algorithm is generally analyzed on two factors time and space. How much time is used for execution and how many space required for algorithm.

18. Tells the common operations that can be performed in a data-structure?

Insertion: adding a data item.

Deletion: removing a data.

Traversal: accessing and visiting all data items one by one.

Searching: finding a particular data item for particular purpose.

Sorting:  arranging data items in a pre-defined sequence.

19. How man approaches are used to develop algorithms?

Greedy Approach: Greedy Approach is used to finding solution by choosing next best option.

Divide and Conquer: Divide and Conquer approach are used to diving the problem to a minimum possible sub-problem and solving them independently.In these data structure interview questions, play a vital rule to success your interview or not.

Dynamic Programming: Dynamic Programming approach is used to diving the problem to a minimum possible sub-problem and solving them combined.

20.What is stack in data structure?

Stack is an abstract data type which is used to store and retrieves data according to LIFO Scheme.

21.What is the difference between a PUSH and a POP in data structures?

Extra question from me I think this is so easy and you can do that yourself because such easy and data structure interview questions can’t bother you to answer well so prepare well and get huge.

Leave a Reply

Your email address will not be published. Required fields are marked *

Interview Questions © 2017 Frontier Theme