Author: github.com/wenjingxue
General Data Structure
Leet code solutions
Those can speed up the problem solving.
# | Name | Use | Wiki Link |
---|---|---|---|
1 | Trie | String/Dictionary | https://en.wikipedia.org/wiki/Trie |
I summaries the key for unlocking each problem. Please give a ⭐ if it inspired you.
# | Title | Difficulty | Solution |
---|---|---|---|
1 | Two Sum | Easy | Use dictionary |
85 | Maximal Rectangle | Hard | 2D to 1D and use Stack |
147 | Insertion Sort List | Medium | Linklist sorting |
198 | House Robber | Medium | Dynamic Programming |
231 | Power Of Two | Easy | Bitwise Operator |
300 | Longest Increasing Sequence | Medium | Intelligently Build a Subsequence with Binary Search |
328 | Odd Even Linked List | Medium | Use two pointers to track progress |
399 | Evaluate Division | Medium | Union Find |
547 | Number of Provinces | Medium | Union Find |
938 | Range Sum of BST | Easy | BST |
1168 | Optimize Water Distribution in a Village | Hard | Kruskal's algorightm and union find |
1217 | Minimum Cost to Move Chips to The Same Position | Easy | Math |
1365 | How Many Numbers Are Smaller Than the Current Number | Easy | sorting and mapping |
1446 | Consecutive Characters | Easy | Comparison within string |
2098 | Subsequence of Size K With the Largest Even Sum | Medium | minHeap |
2096 | Step-By-Step Directions From a Binary Tree Node to Another | Medium | Depth first search |
2100 | Find Good Days to Rob the Bank | Medium | local minimum searching |
2101 | Detonate the Maximum Bombs | Medium | BFS and DFS |
2103 | Rings and Rods | Easy | hashmap |