Unit 2 Linear Data Structure
Unit 2 Linear Data Structure
Operations:
Representation:
- Linked list-based: Each node contains the data and a pointer to the next node.
- Recursion: The call stack stores function calls and local variables.
- Towers of Hanoi: A classic problem solved using recursive algorithms involving stacks.
2.4 Polish Notation: Infix to Postfix Notation; Evaluating Postfix
Expression
- Infix: A + B
- Postfix: AB+
Conversion:
Evaluation of postfix:
Representation:
- Linked List: Each node has data and a pointer to the next.
- Priority Queue: Each element has a priority; element with higher priority is served first.
- Disk scheduling