A comprehensive collection of LeetCode problems organized by patterns and problem types.
- 01_arrays_and_strings - Array manipulation, string processing
- 02_two_pointers - Two pointer technique problems
- 03_sliding_window - Sliding window pattern problems
- 04_hash_table - Hash table and frequency counting
- 05_stack_and_queue - Stack and queue data structures
- 06_linked_list - Linked list operations and algorithms
- 07_trees - Binary trees, BST, tree traversals
- 08_graphs - Graph algorithms (DFS, BFS, shortest path)
- 09_dynamic_programming - DP problems and optimization
- 10_backtracking - Backtracking and recursive solutions
- 11_greedy - Greedy algorithm problems
- 12_binary_search - Binary search variations
- 13_sorting - Sorting algorithms and problems
- 14_math - Mathematical problems and number theory
- 15_bit_manipulation - Bit manipulation techniques
- 16_union_find - Union-Find data structure problems
- 17_trie - Trie (prefix tree) problems
- 18_segment_tree - Segment tree and advanced data structures
- 19_advanced - Complex algorithms and advanced topics
- utils - Common data structures and helper functions
- templates - Code templates for different problem types
-
Each problem folder contains solutions with:
- Problem statement
- Multiple solution approaches
- Time and space complexity analysis
- Test cases
-
Use the templates in the
templates/folder for quick problem setup -
Check
utils/for common data structures and helper functions
- Easy: Fundamental concepts and basic implementations
- Medium: Requires understanding of algorithms and data structures
- Hard: Complex algorithms, optimization, and advanced techniques
- Start with arrays_and_strings for basic concepts
- Move to two_pointers and sliding_window for optimization techniques
- Practice trees and graphs for recursive thinking
- Master dynamic_programming for optimization problems
- Explore advanced topics for complex algorithms
- Files:
problem_number_problem_name.py - Example:
0001_two_sum.py - Each file includes problem description, solution, and complexity analysis
- Python 3.8+
- Recommended IDE: VS Code with Python extension
- Testing: Use built-in Python unittest or pytest
Happy coding! 🎉