10 Data Structure Interview Questions and Answers

What is Data Structure?

Data Structure is an organization of data in such a way that manipulation and operations over the data can be done easily.

There are many ways to achieve this goal. We have two broad categories as Linear and Non-Linear.

The data structure is equally useful in analyzing the complexity of heavy applications running over huge traffic and data.

What is linear and Non-linear data structures?

Linear Data Structures are the structures where data is arranged in a sequential manner and can be added or delete in a sequence.

But not leaner is fashion to arrange data in a non-sequential manner. We can randomly add or delete data from the structure.

What is an Array?

An array is a Linear type Data Structure which is used to collect the similar type of elements and stored in contiguous in memory locations identified by the index.

Index of the array starts from zero(0). We can randomly access the element of the array using these indices.

What is a Stack?

The stack is an ordered collection of elements where addition and removal of elements happen at the same end. Such type of arrangement called LIFO, last-in-first-out.A linked list is Suitable for operations such as add, delete, and update.

There are two elementary operations performed on Stacks

  • push: add a new element at the top of the stack
  • pop: remove the top element fro the top of the stack

What is a Linked List?

A Data structure where elements are connected via links. Links contains Items and reference to another link. There are three types of Linked lists:

  • Simple Linked List
  • Double Linked List
  • Circular Linked List

What is the Queue?

A Queue is a Data Structure opened at its ends. One end is open to insert new items in the queue and another is open to release existing items for queue.

The basic operations of enqueue() and dequeue() work in FIFO- First In First Out Fashion. enqueue() is used to add new items in queue whereas dequeue() is used to remove existing items from queue.

How many types of Linked List are there?

There are three types of Linked lists:

  • Simple Linked List
  • Double Linked List
  • Circular Linked List

What is a Tree?

A tree is a collection of nodes connected to each other and in a hierarchy to maintain parent and child type relationship.

A tree is a nonlinear data structure.

There is a root node and next nodes are connected to root by directed edges and so on. A tree without a node is an empty tree.


What is a Heap?

A heap is a Non-Linear Data Structure based on tree and containing properties of Heap.

What is a Graph?

Collection of Nodes arranged as vertices and edges known as Graph. A graph is a Non-Linear type Data Structure. The relationship found between vertices is known as adjacency.

Spread the love


I’m Dhananjay — a free-spirit with a passion for technologies and blogging.

View all posts by Dhananjay →

14 thoughts on “10 Data Structure Interview Questions and Answers

  1. I simply couldn’t depart your web site prior to suggesting that I extremely enjoyed the usual information an individual provide on your guests? Is going to be again steadily to investigate cross-check new posts|

  2. Aw, this was an incredibly nice post. Finding the time and actual effort to generate a really good article… but what can I say… I procrastinate a lot and never manage to get anything done.

  3. Heya! I just wanted to ask if you ever have any issues with hackers? My last blog (WordPress) was hacked and I ended up losing a few months of hard work due to no data backup. Do you have any methods to protect against hackers?

  4. Wow, fantastic blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your site is magnificent, as well as the content!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.