Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

learning:algorithm

Arrays (43 Problems, 41 Files)

  • Easy Problems (11)

    • Two Sum (LC 1) [Hash Table]

    • Best Time to Sell Stocks (LC 121) [Dynamic Programming]

    • Majority Element (LC 169) [Hash Table, Divide and Conquer, Counting]

    • House Robber (LC 198) [Dynamic Programming]

    • Contains Duplicate (LC 217) [Hash Table, Sorting]

    • Meeting Rooms (LC 252) [Sorting]

    • Coin Change (LC 322) [Dynamic Programming]

    • Maximum Consecutive Ones (LC 485) [N/A]*

    • Find K Closest Elements (LC 658) [Binary Search, Heaps]

    • Binary Search (LC 704) [Binary Search]

    • Min Max Game (LC 2293) [Simulation]

  • Medium Problems (28)

    • Container with Most Water (LC 11) [Two Pointers, Greedy]

    • 3Sum (LC 15) [Two Pointers, Sorting]

    • Next Permutation (LC 31) [Two Pointers]

    • Search in a Rotated Array (LC 33) [Binary Search]

    • Valid Sudoku (LC 36) [Matrix, Hash Table]

    • Combination Sum (LC 39) [Backtracking]

    • Permumations (LC 46) [Recursion, Backtracking]

    • Maximum Subarray (LC 53) [Dynamic Programming, Divide and Conquer]

    • Jump Game (LC 55) [Dynamic Programming]

    • Merge Intervals (LC 56) [Sorting]

    • Insert Intervals (LC 57) [N/A]

    • Sort Colors (LC 75) [Two Pointers, Sorting]

    • Subsets (LC 78) [Recursion, Backtracking]

    • Longest Consecutive Sequence (LC 128) [Hash Table, Sorting]

    • Gas Stations (LC 134) [Greedy]

    • Word Break (LC 139) [Dynamic Programming]

    • Maximum Product Subarray (LC 152) [Dynamic Programming]

    • Rotate Array (LC 189) [Math, Two Pointers]

    • Product of Array Except Self (LC 238) [Prefix Sum]

    • Find the Duplicate Number (LC 287) [Two Pointers, Linked Lists]

    • Longest Increasing Subsequence (LC 300) [Dynamic Programming]

    • Partition Equal Subset Sum (LC 416) [Dynamic Programming]

    • Max Consecutive Ones II (LC 487) [Sliding Window]*

    • Contiguous Array (LC 525) [Hash Table, Prefix Sum]

    • Subarray Sum Equals K (LC 560) [Hash Table, Prefix Sum]

    • Maximize Distance to Closest Person (LC 849) [N/A]

    • Word Subsets (LC 916) [Hash Table]

    • Max Consecutive Ones III (LC 1004) [Sliding Window]*

  • Hard Problems (4)

    • Median of Two Sorted Arrays (LC 4) [Binary Search]

    • First Missing Positive (LC 41) [Hash Table]

    • Trapping Rain Water (LC 47) [Dynamic Programming, Two Pointers]

    • Maximum Profit in Job Scheduling (LC 1235) [Dyanmic Programming, Sorting, Binary Search]

Graphs (16, 15)

  • Easy Problems (1)

    • Flood Fill (LC 733) [Matrix, Graph Search, Hash Table, Stack]
  • Medium Problems (14)

    • Word Search (LC 79) [Graph Search, Backtracking, Matrices, Hash Table]

    • Clone Graph (LC 133) [Graph Search, Hash Table]

    • Number of Islands (LC 200) [Graph Search, Matrices, Queue, Hash Table]

    • Course Schedule (LC 207) [Graph Search, Hash Table]*

    • Course Schedule II (LC 210) [Graph Search, Hash Table]*

    • Graph Valid Tree (LC 261) [Graph Search, Hash Table]

    • Minimum Height Trees (LC 310) [Graph Search, Matrices, Stack, Hash Table]

    • Number of Connected Components in an Undirected Graph (LC 323) [Union Find, Graph Search, Hash Table]

    • Pacific Atlantic Water Flow (LC 417) [Graph Search, Matrices, Hash Table]

    • 01 Matrix (LC 542) [Dynamic Programming, Graph Search, Matrices, Queue, Hash Table]

    • Number of Provinces (LC 547) [Union Find]

    • Accounts Merge (LC 721) [Graph Search, Stack, Hash Table]

    • Rotting Oranges (LC 994) [Graph Search, Matrices, Queue, Hash Table]

    • Shortest Path To Get Food (LC 1730) [Graph Search, Matrices, Queue, Hash Table]

  • Hard Problems (1)

    • Word Ladder (LC 127) [Graph Search, Queue, Hash Table]

Heaps (5)

  • Easy Problems ()

  • Medium Problems (3)

    • Task Scheduler LC 621 [Queue, Hash Table]

    • Top K Frequent Words (LC 692) [Hash Table, Sorting]

    • K Closest Points to Origin (LC 973) [Geometry, Quickselect, Quick Sort, Divide and Conquer]

  • Hard Problems (2)

    • Merge k Sorted Lists (LC 23) [Linked Lists, Sorting]

    • Find Median from Data Stream (LC 295) [Design, Sorting]

Linked Lists (10)

  • Easy Problems (4)

    • Merge Two Sorted Linked Lists (LC 21) [Two Pointers, Recursion]

    • Linked List Cycle (LC 141) [Two Pointers, Hash Table]

    • Reverse Linked List (LC 206) [Recursion]

    • Middle of Linked List (LC 876) [Two Pointers]

  • Medium Problems (6)

    • Add Two Numbers (LC 2) [Two Pointers, Math]

    • Remove Nth Node From End of List (LC 19) [Two Pointers]

    • Swap Nodes in Pairs (LC 24) [Recursion]

    • LRU Cache (LC 146) [Design, Hash Table]

    • Sort List (LC 148) [Two Pointers, Sorting, Divide and Conquer]

    • Odd Even Linked List (LC 328) [Two Pointers]

  • Hard Problems

Matrices (3)

  • Easy Problems (0)

  • Medium Problems (3)

    • Spiral Matrix (LC 54) [Simulation, Math]

    • Number of Unique Paths (LC 62) [Dynamic Programming]

    • Set Matrix Zeroes (LC 73) [Hash Table]

  • Hard Problems

Stacks (12)

  • Easy Problems (3)

    • Valid Parentheses (LC 20) [Stack, Hash Table]

    • Implement Queue Using Stacks (LC 232) [Stack, Queue, Design]

    • Backspace String Compare (LC 844) [String, Two Pointers]

  • Medium Problems (5)

    • Evaluate Reverse Polish Notation (LC 150) [Math]

    • Min Stack (LC 155) [Design]

    • Decode String (LC 394) [Recursion]

    • Asteroid Collision (LC 735) [N/A]

    • Daily Temperatures (LC 739) [N/A]

  • Hard Problems (4)

    • Trapping Rain Water (LC 42) [Multiple Pass]

    • Largest Rectangle in Histogram (LC 84) [N/A]

    • Basic Calculator (LC 224) [Math, Recursion]

    • Max Frequency Stack (LC 895) [Design, Hash Table]

Strings (16)

  • Easy Problems (7)

    • Roman To Integer (LC 13) [Hash Table, Math]

    • Longest Common Prefix (LC 14) [Trie]

    • Add Binary (LC 63) [Binary, Math]

    • Valid Palindrome (LC 125) [Two Pointers]

    • Valid Anagram(LC 242) [Hash Table, Sorting]

    • Ransom Note (LC 383) [Hash Table]

    • Longest Palindrome (LC 409) [Hash Table, Greedy]

  • Medium Problems (8)

    • Longest Substring Without Repeating Characters (LC 3) [Hash Table, Sliding Window]

    • Longest Palindromic Substring (LC 5) [Dynamic Programming]

    • atoi String to Integer (LC 8) [N/A]

    • Letter Combinations of a Phone Number (LC 17) [Recursion, Backtracking, Hash Table]

    • Generate Parentheses (LC 22) [Recursion, Backtracking]

    • Group Anagrams (LC 49) [Arrays, Hash Table, Sorting]

    • Longest Repeating Character Replacement (LC 424) [Hash Table, Sliding Window]

    • Find All Anagrams in a String (LC 438) [Hash Table, Sliding Window]

  • Hard Problems (1)

    • Minimum Window Substring (LC 76) [Hash Table, Sliding Window]

Trees (25, 23)

  • Easy Problems (12)

    • Binary Tree In-Order Traversal (LC 94) [Tree Search, Stack]

    • Same Tree (LC 100) [Tree Search, Recursion]

    • Maximum Depth of Binary Tree (LC 104) [Tree Search, Recursion]

    • Balanced Binary Tree (LC 110) [Tree Search, Recursion]

    • Path Sum (LC 112) [Tree Search, Recursion]*

    • Binary Tree Pre-Order Traversal (LC 144) [Tree Search, Stack]

    • Binary Tree Post-Order Traversal (LC 145) [Tree Search, Stack]

    • Lowest Common Ancestor of a BST (LC 235) [Tree Search]

    • Invert Binary Tree (LC 226) [Tree Search, Recursion]

    • Diameter of Binary Tree (LC 543) [Tree Search, Recursion, Memoization]

    • Increasing Order Search Tree (LC 897) [Tree Search, Queues]

    • Range Sum of BST (LC 938) [Tree Search]

  • Medium Problems (11)

    • Validate Binary Search Tree (LC 98) [Tree Search, BST]

    • Binary Tree Level Order Traversal (LC 102) [Tree Search, Ordered Traversal, Queue]

    • Construct Binary Tree from Preorder and Inorder Traversal(LC 105) [Ordered Traversal, Recursion, Divide and Conquer]

    • Construct Binary Tree from Inorder and Postorder Traversal (LC 106) [Ordered Traversal, Recursion, Divide and Conquer]

    • Path Sum II (LC 113) [Tree Search, Recursion, Backtracking]*

    • Binary Tree Right Side View (LC 199) [Tree Search, Queue]

    • K-th Smallest Element in a BST (LC 230) [Tree Search, Ordered Traversal, Stack]

    • Lowest Common Ancestor of Binary Tree (LC 236) [Tree Search, Recursion]

    • In-Order Successor in BST (LC 285) [Tree Search, Ordered Traversal]

    • Path Sum III (LC 437) [Tree Search, Prefix Sum]*

    • Maximum Width of Binary Tree (LC 662) [Tree Search, Queue]

  • Hard Problems (2)

    • Binary Tree Maximum Path Sum (LC 124) [Tree Search, Recursion]

    • Serialize and Deserialze Binary Tree (LC 297) [Tree Search, Ordered Traversal, Design, Queue, Recursion]

Others (11)

  • Easy Problems (5)

    • Climb Stairs (LC 70) [Dynamic Programming]

    • Number of 1 Bits (LC 191) [Binary, Bit Manipulation]

    • First Bad Version (LC 278) [Binary Search]

    • Couting Bits (LC 338) [Binary, Bit Manipulation, Dynamic Programming]

    • Min Cost Climbing Stairs (LC 746) [Dynamic Programming]

  • Medium Problems (6)

    • Triangle (LC 120) [Dynamic Programming, Recursion]

    • Implement Trie (LC 208) [Design, Trie, Hash Table]

    • Design Add and Search Words Data Structure (LC 211) [Design, Trie, Tree Search]

    • Champagne Tower (LC 799) [Dynamic Programming]

    • Time Based Key-Value Store (LC 981) [Binary Search, Hash Table, Design]

    • Minimum Knight Moves (LC 1197) [Graph Search]

  • Hard Problems

*Problems with multiple parts are stored in the same file
Completed Problems: 141
Index Format: NAME (LINK) [RELATED TOPICS]
This repository helps me keep track of concepts I learn in my Computer Science career, as well as any preparation I have for technical interviews.