This repository contains my solutions to LeetCode problems, implemented in Python and C++. Each solution is optimized for readability and efficiency.
- Total Solutions: 179
- Python Solutions: 90
- C++ Solutions: 89
- LeetCode Profile: HungDongne
LeetCode/
├── *.py # Python solutions
├── *.cpp # C++ solutions
├── SpeedCpp.cpp # C++ template for fast I/O
└── README.md # This file
- Clean, readable solutions
- Leverages Python's built-in data structures
- Focus on algorithmic clarity
- Optimized for performance
- Fast I/O templates included
- Memory-efficient implementations
The solutions cover various algorithmic topics including:
- Array & String Manipulation
- Two Pointers & Sliding Window
- Hash Tables & Hash Maps
- Binary Search
- Dynamic Programming
- Graph Algorithms (DFS, BFS)
- Tree Traversals
- Backtracking
- Greedy Algorithms
- Sorting & Searching
-
Clone the repository:
git clone https://github.com/HungDongne/LeetCode.git cd LeetCode -
Run Python solutions:
python [problem_number].py
-
Compile and run C++ solutions:
g++ -o solution [problem_number].cpp ./solution
Files are named using the LeetCode problem number:
1.py- Problem #1 solution in Python1.cpp- Problem #1 solution in C++1007.py- Problem #1007 solution in Python
Feel free to:
- Suggest optimizations for existing solutions
- Report any bugs or issues
- Discuss alternative approaches
- LeetCode: HungDongne
- GitHub: HungDongne
Happy Coding! 🚀