Welcome to the Leetcode-Solutions repository! 👋 This repository contains my solutions to various LeetCode problems. Each solution is carefully crafted to achieve optimal performance, considering both time and space complexity.
The repository is structured as follows:
├── 1-two-sum
│ ├── README.md
│ └── two-sum.java
├── 11-container-with-most-water
│ ├── README.md
│ └── container-with-most-water.py
└── ...
- README.md (where available): Provides a brief description of the problem and the approach taken to solve it.
- Solution file: The actual code implementation, which may be in different programming languages depending on the problem.
For each solution, performance metrics are included where possible:
- ⏱Time Complexity: Execution time measured in milliseconds (ms).
- 💾Memory Usage: Memory consumption measured in megabytes (MB).
These metrics are listed in the format:
Time: XX ms (YY.XX%) | Memory: ZZ.Z MB (WW.WW%) - LeetSync
Where:
- 'XX ms' is the execution time.
- 'YY.XX%' is the percentile rank based on the execution time.
- 'ZZ.Z MB' is the memory used.
- 'WW.WW%' is the percentile rank based on memory usage.
Feel free to browse through the solutions. To run a solution:
- Navigate to the respective directory.
- Execute the provided script or program file.
- Execution Time: Shows how quickly the code runs compared to other solutions.
- Memory Usage: Indicates how efficiently the code uses memory.
This repository is a personal project, but I welcome any suggestions for optimization or alternative approaches! If you have improvements, feel free to fork the repository and submit a pull request.
For any queries or discussions, please reach out to me via GitHub Issues.
Happy Coding! 🚀