Data Structures and Algorithms
Problems have been sourced from algoexpert.io and leetcode.com. Solutions are written in JavaScript and Python and organized by category.
Sorting Algorithms:
- Bubble sort (AlgoExpert)
- Insertion sort (AlgoExpert)
- Quick sort (AlgoExpert)
- Selection sort (AlgoExpert)
- Merge sort (AlgoExpert)
Array Methods:
- Two number sum (AlgoExpert)
- Two number sum (LeetCode)
- Find minimum rewards (AlgoExpert)
- Move element to end (AlgoExpert)
- Smallest difference (AlgoExpert)
- Three number sum (AlgoExpert)
- Subarray sort (AlgoExpert)
- Four Number Sum (AlgoExpert)
Binary Search Trees:
- Find closest value (AlgoExpert)
- BST construction (AlgoExpert)
- Tree traversal (AlgoExpert)
- Validate BST (AlgoExpert)
- Same BST (AlgoExpert)
Graphs:
- Depth-first search (AlgoExpert)
- Has single cycle (AlgoExpert)
- Breadth-first search (AlgoExpert)
- River sizes (AlgoExpert)
- Word ladder (LeetCode)
- Youngest common ancestor (AlgoExpert)
- Boggle board (AlgoExpert)
Linked Lists:
- Linked list construction (AlgoExpert)
- Remove kth node from end (AlgoExpert)
- Find loop (AlgoExpert)
- Merge two linked lists (LeetCode)
- Merge two linked lists (AlgoExpert)
Recursion:
- Nth Fibonacci (AlgoExpert)
- Product sum (AlgoExpert)
- Permutation (AlgoExpert)
- Lowest common manager (AlgoExpert)
- Interweaving strings (AlgoExpert)
Dynamic Programming:
- Max subset sum no adjacent (AlgoExpert)
- Number of ways to make change (AlgoExpert
- Coin Change (AlgoExpert)/LeetCode)
- Levenshtein distance (AlgoExpert)
Binary Trees:
- Branch sums (AlgoExpert)
- Invert binary tree (AlgoExpert)
- Max path in binary tree (AlgoExpert)
- Iterative in order traversal (AlgoExpert)
- Flatten binary tree (AlgoExpert)
Strings:
- Roman to integer (LeetCode)
- Check palindrome (AlgoExpert)
- Caesar cipher encryptor (AlgoExpert)
- Longest palindromic string (AlgoExpert)
- Longest substring no duplication (AlgoExpert)
- Underscorify substring
LeetCode 30 Day Challenge:
- Single number
- Happy number
- Max subarray
- Move zeroes
- Best time to buy and sell stock
- Group anagrams
- Counting elements
- Middle of linked list
- Backspace string compare
- Min stack
- Diameter of binary tree
- Last stone weight
- Contiguous array
- Peform string shifts
- Product of array except self
- Valid parenthesis string
- Number of islands
- Min path sum
- Search in rotated array
- Subarray sum equals k
Pramp: