Algorithm Training from AlgoMonster
Algo-Kotlin
Algorithm Training from AlgoMonster
Set up Kotlin project with Gradle in the Codespace
- Add a new Repository in the github
- Clone to Codespace and auto prepared the develop environment
- Add extention for Git and Kotlin
- Install Gradle plugin in the Terminal by commond of
sdk install gradle
$ sdk install gradle ==== BROADCAST ================================================================= 2022-08-22: neo4jmigrations 1.10.0 available on SDKMAN! https://github.com/michael-simons/neo4j-migrations/releases/tag/1.10.0 2022-08-19: asciidoctorj 2.5.5 available on SDKMAN! 2022-08-19: micronaut 3.6.1 available on SDKMAN! ================================================================================ gradle 7.5.1 is already installed.
- Init the Kotlin project with gradle Building Kotlin Applications Sample
- Generated folder as following:
├── gradle │ └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── app ├── build.gradle └── src ├── main │ └── kotlin │ └── demo │ └── App.kt └── test └── kotlin └── demo └── AppTest.kt
Algorithm Basic
Basic Data Structure
- Stack
- Queue
- Hashmap
Basic ALgorithms
- Sorting
- Advanced Sorting Algorighms
- Merge Sort
- Quick Sort
Binary Search
Overview
- Vanilla Binary Search
- Finding the Boundary
Sorted Array
- First Element Not Smaller than Target
- First Occurrence
- Square Root
Implicitely Sorted Array
- Minimum in Rotated Sorted Array
- Peak of Mountain Array
Advanced
- Capacity to Ship Packages Within D Days
- Newspapers
Depth First Search
Introduction
- Recursion Reveiw
- Introduction to Tree Data Struture
- DFS Fundamentals
DFS on Tree
- Introduction
- Max Depth of A Tree
- Visible Tree Node
- Balanced Binary Tree
- Serializing and Deserializing Binary Tree
Binary Search Tree
- Binary Search Tree Info
- Valid Binary Seach Tree
- Insert Into BST
- Invert Binary Tree
- Lowest Common Ancestor of a Binary Search Tree
Advanced
- Lowest Common Ancestor
Backtracking
Combinatorial Search
- DFS with States
- Backtracking Fundamentals
- Permutations
- Letter Combinations of A Phone Number
Memoization
- Memoization Intro
- Word Break
- Decode Ways
Pruning
- Pruning Introduction
- Palindrome Partitioning
Dedup
- Combination Sum
Additional Practices
- Subsets
Breadth First Search
Introdution
- BFS Fundamentals
BFS on Tree
- Binary Tree Level Order Traversal
- Binary Tree ZigZag Level Order Traversal
- Binary Tree Right Side View
- Binary Tree Min Depth
Graph
Introduction
- Graph Fundamentals
- BFS on Graphs
- DFS on Graphy
- BFS or DFS
Vanilla BFS
- Shortest Path
Matrix as Graph
- Matrix as Graph
- Flood Fill
- Number of Islands
- Knight Miniimum Moves
- Walls and Gates / Zombie in Matrix
Implicit Graph
- Open the Lock
- Word Ladder
- Sliding Puzzle
Directed Graph / Topological Sort
- Topological Sort Introduction
- Task Scheduling
- Reconstructing Sequence
- Task Scheduling 2
- Alien Dictionary
- Course Schedule
Weighted Graph
- Dijkastra’s Algorithm | Shortest Path in a Weighted Graph
- Uniform Cost Search | Shortest Path in a Weighted Graph
Minimum Spanning Tree
- Introdution to Minimum Spanning Tree
- Minimum Spanning Tree | Forests
Two Pointers
Introduction
- Two Pointers Introduction
Same Direction
- Remove Duplicates
- Middle of a Linked List
- Move Zeros
Opposite Direction
- Two Sum Sorted
- Valid Palindrome
Sliding Window
- Longest Substring without Repeating Characters
- Find All Anagrams in a String
- Minimum Window Substring
Prefix Sum
- Subarray Sum
Cycle Finding
- Linked List Cycle
Advanced
- Get the Maximum Score
- Trapping Rain Water
Priority Queue / Heap
Instrodution
- Heap Fundamentals
Top K
- K Closest points
- Merge K Sorted Lists
- Kth Largest ELement in an Array
- Kth Smallest Eletment in a Sorted Matrix
Moving Best
- Reorganze String
- Ugly Number
Multiple Heaps
- Median of Data Stream
Dynamic Programming
Introdution
- Dynamic Programming Introduction
Knapsack
- Knapsack, Weight-Only
- Partion to Two Equal Sum Subsets
- Triangle
Coin Change
- Coin Change
- Coin Change 2
Grid
- Number of Robots Paths
- Minimal Path Sum
- Maximal Square
Dynamic number of subproblems
- Longest Increasing Subsquences
- Russian Doll Envelopes
- Largest Divisible Subset
- Perfect Squares
Game Theory
- Divisor Game
interval
- Interval Dynamic Programming | Coin Game
- Festival Game
Two Sequences
- Longest Common Subsquence
- Edit Distance
- Delete String
0-1 Knapsack
- 0-1 Knapsack
Bitmask
- Bitmask Introduction
- Min Cost to Visit Every Node
Advanced Data Structures
Dsijoint Set Union | Union Find
- DSU/Union Find Fundamentals
- DSU Introduction Problem
- Size of Connect Components
- Umbristan | Reverse Union Find
- Merge User Accounts
- Number of Connected Components
Trie
- Trie Introduction
- Autocomplete
- Prefix Count
Data Structure Design
- LRU Cache
Segment Tree
- Segment Tree
- Range max