Hiried Important Data Structures Interview Questions with Answers

31. What is a Stack? Explain with example?
• Definition of Stack
• Operations of Stack: PUSH and POP
• Example

32. Write the algorithm for converting infix expression to postfix expression?
• Definition of Expression
• Types of expression
• Algorithm for infix to postfix expression
• Example

33. What is a Queue? Explain its operation with example?
• Definition of Queue
• Operations of Queue: insert and remove
• Example

34. Explain the applications of stack?
• Evaluating arithmetic expression
• Balancing the symbols
• Function calls

35. Write an algorithm for inserting and deleting an element from doubly linked list? Explain linear linked implementation of Stack and Queue?
• Introduction to Doubly linked list
• Operations: insertion and deletion with algorithm
•  Linked list implementation of Stack
• Linked list implementation of Queue

36. What are the different binary tree traversal techniques?
• Preorder traversal
• Inorder traversal
• Postorder traversal
• Levelorder traversal

37. What are the tasks performed while traversing a binary tree?
• Visiting a node
• Traverse the left sub-tree
• Traverse the right sub-tree

38. What are the tasks performed during preorder traversal?
• Process the root node
• Traverse the left sub-tree
• Traverse the right sub-tree

39. What are the tasks performed during inorder traversal?
• Traverse the left sub-tree
• Process the root node
• Traverse the right sub-tree

40. What are the tasks performed during postorder traversal?
• Traverse the left sub-tree
• Traverse the right sub-tree
• Process the root node

Read More Questions:
Data Structures Interview Questions Part1
Data Structures Interview Questions Part2
Data Structures Interview Questions Part3
Data Structures Interview Questions Part4
Data Structures Interview Questions Part5

No comments:

Post a Comment