DS 2 Mark Answers
DS 2 Mark Answers
Time Complexity: Measures the amount of time an algorithm takes relative to input size.
Reversing data
Expression evaluation
Syntax parsing
Doubly Linked List: Nodes have two pointers (next and previous)
Circular Linked List: Last node points back to the first node
Insertion
Deletion
Traversal
Searching
Reversing
---
Caches
Password verification
---
Unit – 4: Trees
Full
Complete
Perfect
Skewed
Balanced
Root is black
Self-balancing tree
6. When AVL tree is said to be balanced and how to find balance factor?
AVL tree is balanced if balance factor of every node is -1, 0, or +1.
Balance Factor = Height(left subtree) – Height(right subtree)
---
Unit – 5: Graphs
7. Applications of Graphs
Social networks
Network flows
Dependency resolution
8. Operations on Graphs
Search (DFS/BFS)
Path finding
Cycle detection
Topological sort