This repository contains a collection of Python solutions for selected LeetCode problems. The files are organized by problem number to make practice and review easier.
- 01_sum_problem.py - Example of a basic sum problem.
- 02_add_two_numbers.py - Add Two Numbers using linked-list logic.
- 03_longest_string_without_repeatiation.py - Longest substring without repeating characters.
- 04_median_two_sortedarrays.py - Find the median of two sorted arrays.
- 05_longest_palindromic_string.py - Longest palindromic substring.
- 06_Zigzag_conversion.py - Zigzag Conversion problem.
- 07_reversed_integer.py - Reverse Integer with overflow handling.
- 08_String_to_integer.py - String to Integer (atoi-style parsing).
- 09_palindrom_number.py - Palindrome Number check.
- 10_regular_expression_matching.py - Regular Expression Matching problem.
- 11_Container_eith_most_water.py - Container With Most Water solution.
- 12_integer_to_roman.py - Integer to Roman numeral conversion.
- 13_Roman_to_integer.py - Roman numeral to Integer conversion.
- 14_longest_common_prefix.py - Longest Common Prefix problem.
- 15_3_Sum.py - Three Sum problem.
- Practice Python coding by solving LeetCode-style algorithm problems.
- Learn and revisit common problem patterns, data structures, and string/integer manipulation.
- Keep a portable collection of solutions for study and reference.
- Open any problem file in the repository.
- Review the implementation and comments to understand the approach.
- Run the file with Python to verify the solution.
Example:
python 01_sum_problem.py
python 12_integer_to_roman.py- Filenames are organized by problem number, and some names may contain minor typos.
- You can add new solution files following the existing numbering pattern.
- For best practice, compare the implementation against official LeetCode constraints and edge cases.