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
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