Data Structure Interview Questions With Answer
1. what is linked list?
Linked list is a linear collection of data elements called nodes.
2. how much parts a node contains?
- nodes is divided into two parts:-
- data field:- where the data are stored .
- link field:- contains the address of the next node in the list.
3. what is stack?
A stack is a data structures in which insertion and deletion of items are made at the one end called the top of the stack.
4. what is push operation?
add an item into a stack that is called puch operation.
5. what is pop operation?
remove an item from a stack that is called pop operation.
6. what is queue?
queue is a linear list of elements in which deletions can take place only at one end called the front and insertions can take place only at the other end called the rear.
7. what is infix notation?
all arithmetic expression the operators are placed in between the operands like this:- A+B and (X+Y)* Z.
8. what is polish notation?
operator is placed in between the operands like this:- +AB and *+XYZ.
9. what is reverse polish notation?
operator is placed after its two operands like this:- AB+ and XY+Z*.
10. what is post order traversal?
traversal starts with the left most sub tree then proceeds with right sub tree and print the parent of those nodes.
11. what is preorder traversal?
traversal technique with the root nide then proceeds towards the end of the left sub tree and then towards the right sub tree.
12. BFS Stands for?
breadth first search.
13. DFS stands for?
depth first search.
14. what is BFS?
BFS is a strategy for searching in a graph when search is limited.
15. what is bubble sort ?
bubble sort is straightforward and simplistic method of sorting data that is used very commonly it starts at the beginning of the data set.
16. what is selection sort?
selection sort is one of the sorting technique that are typically used for sequencing small lists.
17. what is sequential search?
element of the array is compared to the key searching of the element in the order it appears in the array until the element key is found that is called sequential search.
18. what is binary search?
binary search is one of the fastest ways to search the element in a sorted array. the idea is to look at the element in the middle.
19. GCD stands for?
greatest common divisor.
20. what is merge sort?
merge sort is a comparison-based sorting algorithm.implementations uses divided and conquer algorithm merge sort breaks the data into small data sets sorts those small sets and then merges the resulting sorted lists together.
21.what is heap sort?
heap sort often uses for very large array which are in unsorted states the largest or smallest element of the list is determined and then placed at the end or beginning of the list.
22. what is knapsack algorithm?
knapsack problem is a problem in combinatorial optimization finding an optimal object from a finite set of objects.
23. what is job sequence with dead line?
profit is earned if and only if the job is completed within its deadline.
24. what is uses of Dijkstra's algorithm?
Dijkstra's algorithm is used to find the shortest path between the two vertices in a weighted directed graph and it is also very popular and efficient to find each and every path from starting to terminal vertices.
25. what is deletion.
deletion is the process of removing a node from the linked list.
© 2017 - All Rights Reserved