Data Structures and Algorithms - Lecture Notes
Course: CS101 - Introduction to Computer Science
Instructor: Dr. Alex Kim
Semester: Fall 2024
1. Arrays and Linked Lists
- Arrays: Fixed-size, index-based access, O(1) retrieval, costly insertion/deletion.
- Linked Lists: Dynamic size, O(n) search, O(1) insertion/deletion (with pointer).
2. Stacks and Queues
- Stack: LIFO structure, supports push/pop.
- Queue: FIFO structure, supports enqueue/dequeue.
- Applications: Function calls, BFS, expression evaluation.
3. Trees
- Binary Trees, Binary Search Trees (BST), AVL Trees.
- Operations: Inorder, Preorder, Postorder traversals.
- Applications: Syntax trees, databases, file systems.
4. Hash Tables
- Key-value mapping using hash functions.
- Handling collisions: chaining, open addressing.
- Applications: Caches, dictionaries, sets.
5. Graphs
- Representations: Adjacency list/matrix.
- Traversals: DFS, BFS.
- Applications: Social networks, maps, dependency graphs.