Click here for problem descriptions.
Solutions in various programming languages are provided. Enjoy it.
Coming soon...
Click here for problem descriptions.
Solutions in various programming languages are provided. Enjoy it.
- First Bad String: Binary search.
- Jewels and Stones: Hash Table
- Ransom Note: Hash Table
- Number Complement: Bitwise Manipulation
- First Unique Character In a String: Hash Table
- Majority Element: Ad hoc
- Cousins in Binary Tree: BFS / Recursion
- Check if it is straight line: Cross Product
- Valid Perfect Square: Math
- Find the Town Judge: Graph Theory
- Flood Fill: BFS
- Single Element In a Sorted Array: Binary Search
- Remove K Digits: Greedy
- Implement Trie: Trie
- Maximum Sum Circular Subarray: DP
- Odd Even Linked List: Linked List
- Find All Anagrams in a String: Sliding window + Hash Table
- Permutation In String: Sliding window + Hash Table
- Online Stock Span: DP
- Kth-Smallest-Element-In-A-BST: BST
- Count Square Submatrices with All Ones: DP
- Sort Characters By Frequency: Hash Table
- Interval List Intersections: Two Pointers
- Construct Binary Search Tree from Preorder Traversal: Binary Search Tree
- Uncrossed Lines: DP
- Contiguous Array: Hash Table
- Possible Bipartition: Bipartite Graph
- Counting Bits: Math
- Course Schedule: Topological Sort
- K Closest Points to Origin: Priority_queue, Sort
- Edit Distance: DP
Click here for problem descriptions.
- Single Number: Bitwise Manipulation
- Happy Number: Implementation
- Maximum Subarray: DP
- Move Zeros: Two pointers
- Best Time to Buy and Sell Stock II: Greedy
- Group Anagrams: Hash Table