How mayongupta/leetcode works
This repository is a catalog of standalone Python solutions to classic LeetCode problems, not an application that executes them as a service. The main workflow is to browse the documented index, choose a topic and solution, then paste its LeetCode-compatible class and method into the platform and use it to compute an answer. The graph preserves all 16 indexed problems and the shared linked-list/tree node definitions. Solution-to-solution calls are not shown; the sampled sources do not establish such relationships.
Main entry points: README.md Solutions Index · reverse_linked_list.py Reverse List · merge_k_sorted_lists.py Merge K Lists · binary_tree_level_order_traversal.py Tree Level Order
Components 20
Arrays
- Two Sum
problems/arrays/two_sum.py - Stock Profit
problems/arrays/best_time_to_buy_sell_stock.py - Maximum Subarray
problems/arrays/maximum_subarray.py - Median Of Arrays
problems/arrays/median_of_two_sorted_arrays.py
Strings
- Valid Parentheses
problems/strings/valid_parentheses.py - Longest Substring
problems/strings/longest_substring_without_repeating.py
Lists And Trees
- Reverse List
problems/linked_list/reverse_linked_list.py - Merge K Lists
problems/linked_list/merge_k_sorted_lists.py - Tree Level Order
problems/trees/binary_tree_level_order_traversal.py - Shared Node Types
utils/data_structures.py
Dynamic Programming
- Coin Change
problems/dynamic_programming/coin_change.py - Word Break
problems/dynamic_programming/word_break.py
Graphs
- Course Schedule
problems/graphs/course_schedule.py - Number Of Islands
problems/graphs/number_of_islands.py
Heaps And Design
- Kth Largest
problems/heaps_and_intervals/kth_largest_element.py - LRU Cache
problems/heaps_and_intervals/lru_cache.py - Merge Intervals
problems/heaps_and_intervals/merge_intervals.py
Other components
- Problem Solver
- Solutions Index
README.md - Computed Answer
Connections 36
- Problem Solver → Solutions Index: browses
README.md - Solutions Index → Two Sum: lists
README.md - Solutions Index → Stock Profit: lists
README.md - Solutions Index → Maximum Subarray: lists
README.md - Solutions Index → Median Of Arrays: lists
README.md - Solutions Index → Valid Parentheses: lists
README.md - Solutions Index → Longest Substring: lists
README.md - Solutions Index → Reverse List: lists
README.md - Solutions Index → Merge K Lists: lists
README.md - Solutions Index → Tree Level Order: lists
README.md - Solutions Index → Coin Change: lists
README.md - Solutions Index → Word Break: lists
README.md - Solutions Index → Course Schedule: lists
README.md - Solutions Index → Number Of Islands: lists
README.md - Solutions Index → Kth Largest: lists
README.md - Solutions Index → LRU Cache: lists
README.md - Solutions Index → Merge Intervals: lists
README.md - Two Sum → Computed Answer: returns result
README.md - Stock Profit → Computed Answer: returns result
README.md - Maximum Subarray → Computed Answer: returns result
README.md - Median Of Arrays → Computed Answer: returns result
problems/arrays/median_of_two_sorted_arrays.py - Valid Parentheses → Computed Answer: returns result
README.md - Longest Substring → Computed Answer: returns result
problems/strings/longest_substring_without_repeating.py - Reverse List → Computed Answer: returns result
problems/linked_list/reverse_linked_list.py - Merge K Lists → Computed Answer: returns result
problems/linked_list/merge_k_sorted_lists.py - Tree Level Order → Computed Answer: returns result
problems/trees/binary_tree_level_order_traversal.py - Coin Change → Computed Answer: returns result
README.md - Word Break → Computed Answer: returns result
problems/dynamic_programming/word_break.py - Course Schedule → Computed Answer: returns result
problems/graphs/course_schedule.py - Number Of Islands → Computed Answer: returns result
problems/graphs/number_of_islands.py - Kth Largest → Computed Answer: returns result
README.md - LRU Cache → Computed Answer: returns result
problems/heaps_and_intervals/lru_cache.py - Merge Intervals → Computed Answer: returns result
problems/heaps_and_intervals/merge_intervals.py - Reverse List → Shared Node Types: uses ListNode
problems/linked_list/reverse_linked_list.py - Merge K Lists → Shared Node Types: uses ListNode
problems/linked_list/merge_k_sorted_lists.py - Tree Level Order → Shared Node Types: uses TreeNode
problems/trees/binary_tree_level_order_traversal.py