Data Structures and Algorithms
Learning Data Structures and Algorithms is important in Computer Science because they allow you to solve challenging problems.
Data Structures and Algorithms Resources that I have used:
- Data Structures & Algorithms in Python Book - Goodrich
- The Algorithm Design Manual - Steven Skiena
- CS Dojo youtube videos
- mycodeschool youtube channel
Link to my GitHub Repository:
Data Structures and Algorithms Repository
Algorithm Analysis
Algorithms:
Sorting Algorithms
Project using Sorting Algorithms coming soon!
Sorting Algorithm Complexity
Algorithm | Running Time (Average) | Running Time (Worst) | Space Complexity (Worst) |
---|---|---|---|
QuickSort | (n log(n)) | O (n^2) | O(n log(n)) |
Insertion Sort | (n) | O (n^2) | O(1) |
Merge Sort | (n log(n)) | O(n log(n)) | O(n) |
Bubble Sort | (n) | O (n^2) | O(1) |
Data Structures:
Arrays:
- The Simplest Data Structure
Stacks and Queues
-
Deques
-
Circular Queue
Linked Lists
- Includes:
Singly Linked Lists:
- Insertion, Deletion, Find the Nth-to-last Node, Length of Singly Linked List
- Rotate around a Pivot, Reverse Linked List, Node Swap, Remove Duplicates
- Move Tail to Head, Merge two Sorted signly Linked Lists
Doubly:
- Insertion, Deletion, Append and Prepend Doubly Linked List
- Pairs with Sum, Remove Duplicates, Reverse Doubly Linked List
Circular Linked Lists:
- Insertion, Deletion, Split list, and Josephus Problem using Circular Linked Lists
Trees
Includes:
- General Tree
- Binary Tree
- Binary Search Tree
- AVL Tree, Red-Black Tree, Splay Tree, Treap, B -Tree
Heaps
- Special Tree-Based data structure
- Usually represented as an Array
Two Types of Heaps
- Min Heap
- Max Heap
Different Applications of Heaps:
- Heap Sort - One of the best sorting algorithms!
- Priority Queues
- Graph Algorithms
Maps and Hash Tables
-
Hash Tables
-
Includes Hash Project (in progress)
Graphs
-
Properties of Graphs
- Self-Loop, Multi-Edges, Walk, Path, Trail
- Connected and Strongly Connected Graphs, Closed Walk, Cycle, Acyclic Graph
-
Graph Representation
- List and Matrix Representation
- Graph Traversals
- Depth First Search and Breadth First Search
-
Topological Sort
- Shortest Path
- Djikstra’s Algorithm and Warshall’s Algorithm
-
Minimum Spanning Tree (MST)
- Includes Graph Project
Dynamic Programming
-
Greedy Algorithm
-
Includes Dynamic Programming Project