Skip to content
rebeloper edited this page Jul 13, 2026 · 27 revisions

This tutorial walks through Data Structures & Algorithms in a carefully structured progression — entirely in Swift:

🧮 Foundations

  1. Big-O Notation

🧱 Data Structures

  1. Arrays & Strings
  2. Hash Maps & Hash Sets
  3. Linked Lists
  4. Stacks
  5. Queues & Deques
  6. Binary Trees
  7. Binary Search Trees
  8. Heaps & Priority Queues
  9. Tries
  10. Graphs
  11. Union-Find
  12. Segment & Fenwick Trees

🧩 Patterns

  1. Two Pointers
  2. Sliding Window
  3. Fast and Slow Pointers
  4. Binary Search
  5. DFS and Backtracking
  6. BFS
  7. Topological Sort
  8. Union-Find Pattern
  9. Monotonic Stack
  10. Prefix Sum
  11. Merge Intervals
  12. Top-K and Heap Pattern
  13. 1D Dynamic Programming
  14. 2D Dynamic Programming
  15. Greedy
  16. Matrix Traversal
  17. Bit Manipulation Tricks

🎯 NeetCode 150

Arrays & Hashing

  1. Contains Duplicate
  2. Valid Anagram
  3. Two Sum
  4. Group Anagrams
  5. Top K Frequent Elements
  6. Product of Array Except Self
  7. Valid Sudoku
  8. Encode and Decode Strings
  9. Longest Consecutive Sequence

Two Pointers

  1. Valid Palindrome
  2. Two Sum II - Input Array Is Sorted
  3. 3Sum
  4. Container With Most Water
  5. Trapping Rain Water

Sliding Window

  1. Best Time to Buy and Sell Stock
  2. Longest Substring Without Repeating Characters
  3. Longest Repeating Character Replacement
  4. Permutation in String
  5. Minimum Window Substring
  6. Sliding Window Maximum

Stack

  1. Valid Parentheses
  2. Min Stack
  3. Evaluate Reverse Polish Notation
  4. Generate Parentheses
  5. Daily Temperatures
  6. Car Fleet
  7. Largest Rectangle in Histogram

Binary Search

  1. Binary Search
  2. Search a 2D Matrix
  3. Koko Eating Bananas
  4. Search in Rotated Sorted Array
  5. Find Minimum in Rotated Sorted Array
  6. Time Based Key-Value Store
  7. Median of Two Sorted Arrays

Linked List

  1. Reverse Linked List
  2. Merge Two Sorted Lists
  3. Reorder List
  4. Remove Nth Node From End of List
  5. Copy List with Random Pointer
  6. Add Two Numbers
  7. Linked List Cycle
  8. Find the Duplicate Number
  9. LRU Cache
  10. Merge k Sorted Lists
  11. Reverse Nodes in k-Group

Trees

  1. Invert Binary Tree
  2. Maximum Depth of Binary Tree
  3. Diameter of Binary Tree
  4. Balanced Binary Tree
  5. Same Tree
  6. Subtree of Another Tree
  7. Lowest Common Ancestor of a Binary Search Tree
  8. Binary Tree Level Order Traversal
  9. Binary Tree Right Side View
  10. Count Good Nodes in Binary Tree
  11. Validate Binary Search Tree
  12. Kth Smallest Element in a BST
  13. Construct Binary Tree from Preorder and Inorder Traversal
  14. Binary Tree Maximum Path Sum
  15. Serialize and Deserialize Binary Tree

Tries

  1. Implement Trie (Prefix Tree)
  2. Design Add and Search Words Data Structure
  3. Word Search II

By following this path, you'll go from:

👉 "I memorized 150 answers 😵" to 👉 "I recognize the pattern before I finish reading the problem 💡"

Clone this wiki locally