|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +title: Cheatsheets - CS Fundamentals |
| 4 | +permalink: /cheatsheets/ |
| 5 | +--- |
| 6 | + |
| 7 | +# Computer Science Cheatsheets |
| 8 | + |
| 9 | +This collection contains comprehensive cheatsheets covering all major computer science topics and algorithmic patterns essential for coding interviews and software development. |
| 10 | + |
| 11 | +## 📊 Data Structures |
| 12 | + |
| 13 | +| Topic | Description | Link | |
| 14 | +|-------|-------------|------| |
| 15 | +| **Arrays** | Array operations, techniques, and patterns | [View]({{ site.baseurl }}/doc/cheatsheet/array.html) | |
| 16 | +| **Binary Trees** | Tree traversal, construction, and manipulation | [View]({{ site.baseurl }}/doc/cheatsheet/binary_tree.html) | |
| 17 | +| **Binary Search Trees** | BST operations and balancing | [View]({{ site.baseurl }}/doc/cheatsheet/bst.html) | |
| 18 | +| **Graphs** | Graph algorithms, traversal, and analysis | [View]({{ site.baseurl }}/doc/cheatsheet/graph.html) | |
| 19 | +| **Hash Maps** | Hashing techniques and collision handling | [View]({{ site.baseurl }}/doc/cheatsheet/hash_map.html) | |
| 20 | +| **Heaps** | Priority queues and heap operations | [View]({{ site.baseurl }}/doc/cheatsheet/heap.html) | |
| 21 | +| **Linked Lists** | List operations and pointer manipulation | [View]({{ site.baseurl }}/doc/cheatsheet/linkedlist.html) | |
| 22 | + |
| 23 | +## 🔍 Algorithm Patterns |
| 24 | + |
| 25 | +| Pattern | Description | Link | |
| 26 | +|---------|-------------|------| |
| 27 | +| **Two Pointers** | Efficient array and string processing | [View]({{ site.baseurl }}/doc/cheatsheet/2_pointers.html) | |
| 28 | +| **Binary Search** | Efficient searching in sorted data | [View]({{ site.baseurl }}/doc/cheatsheet/binary_search.html) | |
| 29 | +| **Sliding Window** | Subarray and substring problems | [View]({{ site.baseurl }}/doc/cheatsheet/sliding_window.html) | |
| 30 | +| **Backtracking** | Recursive problem solving | [View]({{ site.baseurl }}/doc/cheatsheet/backtrack.html) | |
| 31 | +| **Dynamic Programming** | Optimization and memoization | [View]({{ site.baseurl }}/doc/cheatsheet/dp.html) | |
| 32 | +| **Greedy Algorithms** | Local optimization strategies | [View]({{ site.baseurl }}/doc/cheatsheet/greedy.html) | |
| 33 | + |
| 34 | +## 🌐 Graph Algorithms |
| 35 | + |
| 36 | +| Algorithm | Description | Link | |
| 37 | +|-----------|-------------|------| |
| 38 | +| **BFS (Breadth-First Search)** | Level-order traversal and shortest paths | [View]({{ site.baseurl }}/doc/cheatsheet/bfs.html) | |
| 39 | +| **DFS (Depth-First Search)** | Deep exploration and connectivity | [View]({{ site.baseurl }}/doc/cheatsheet/dfs.html) | |
| 40 | +| **Dijkstra's Algorithm** | Single-source shortest paths | [View]({{ site.baseurl }}/doc/cheatsheet/Dijkstra.html) | |
| 41 | +| **Topological Sort** | Dependency resolution and ordering | [View]({{ site.baseurl }}/doc/cheatsheet/topological_sort.html) | |
| 42 | + |
| 43 | +## ⚡ Advanced Topics |
| 44 | + |
| 45 | +| Topic | Description | Link | |
| 46 | +|-------|-------------|------| |
| 47 | +| **Bit Manipulation** | Bitwise operations and tricks | [View]({{ site.baseurl }}/doc/cheatsheet/bit_manipulation.html) | |
| 48 | +| **System Design** | Scalability and architecture patterns | [View]({{ site.baseurl }}/doc/cheatsheet/design.html) | |
| 49 | +| **Intervals** | Interval merging and scheduling | [View]({{ site.baseurl }}/doc/cheatsheet/intervals.html) | |
| 50 | +| **Math & Geometry** | Mathematical algorithms and computations | [View]({{ site.baseurl }}/doc/cheatsheet/math.html) | |
| 51 | + |
| 52 | +## 💡 Problem-Solving Techniques |
| 53 | + |
| 54 | +| Technique | Description | Link | |
| 55 | +|-----------|-------------|------| |
| 56 | +| **Pattern Recognition** | Common problem patterns and templates | [View]({{ site.baseurl }}/doc/cheatsheet/dp_pattern.html) | |
| 57 | +| **Code Templates** | Reusable code patterns and structures | [View]({{ site.baseurl }}/doc/cheatsheet/00_template.html) | |
| 58 | +| **Java Tricks** | Language-specific optimizations | [View]({{ site.baseurl }}/doc/cheatsheet/java_trick.html) | |
| 59 | +| **Python Tricks** | Python-specific techniques | [View]({{ site.baseurl }}/doc/cheatsheet/python_trick.html) | |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +## 📋 Quick Reference |
| 64 | + |
| 65 | +### Time & Space Complexity Guide |
| 66 | +- **O(1)** - Constant time operations |
| 67 | +- **O(log n)** - Binary search, balanced trees |
| 68 | +- **O(n)** - Linear traversal, single pass |
| 69 | +- **O(n log n)** - Efficient sorting, divide & conquer |
| 70 | +- **O(n²)** - Nested loops, brute force |
| 71 | +- **O(2ⁿ)** - Exponential, recursive backtracking |
| 72 | + |
| 73 | +### Common Data Structure Operations |
| 74 | + |
| 75 | +| Structure | Access | Search | Insertion | Deletion | Space | |
| 76 | +|-----------|---------|---------|-----------|----------|-------| |
| 77 | +| Array | O(1) | O(n) | O(n) | O(n) | O(n) | |
| 78 | +| Dynamic Array | O(1) | O(n) | O(1)* | O(n) | O(n) | |
| 79 | +| Hash Table | N/A | O(1)* | O(1)* | O(1)* | O(n) | |
| 80 | +| Binary Tree | O(log n)* | O(log n)* | O(log n)* | O(log n)* | O(n) | |
| 81 | + |
| 82 | +*Average case performance |
| 83 | + |
| 84 | +--- |
| 85 | + |
| 86 | +*All cheatsheets are continuously updated with the latest patterns and techniques used in top-tier tech companies.* |
0 commit comments