Data Structure Interview Questions – Set 06

Write the C program to insert a node in circular singly list at the beginning. #include #include void beg_insert(int); struct node { int data; struct node *next; }; struct node *head; void main () { int choice,item; do { printf(“nEnter the item which you want to insert?n”); scanf(“%d”,&item); beg_insert(item); printf(“nPress 0 to insert more ?n”); … Read more

Data Structure Interview Questions – Set 05

What is doubly linked list? The doubly linked list is a complex type of linked list in which a node contains a pointer to the previous as well as the next node in the sequence. In a doubly linked list, a node consists of three parts: node data pointer to the next node in sequence … Read more

Data Structure Interview Questions – Set 04

What is a Stack? Stack is an ordered list in which, insertion and deletion can be performed only at one end that is called the top. It is a recursive data structure having pointer to its top element. The stack is sometimes called as Last-In-First-Out (LIFO) list i.e. the element which is inserted first in … Read more

Data Structure Interview Questions – Set 03

Which data structure is used to perform recursion? Stack data structure is used in recursion due to its last in first out nature. Operating system maintains the stack in order to save the iteration variables at each function call Write the syntax in C to create a node in the singly linked list. struct node … Read more

Data Structure Interview Questions – Set 02

What are the advantages of Selecetion Sort? It is simple and easy to implement. It can be used for small data sets. It is 60 per cent more efficient than bubble sort. List the types of tree. There are six types of tree given as follows. General Tree Forests Binary Tree Binary Search Tree Expression … Read more