An open API service indexing awesome lists of open source software.

https://github.com/tareqalkushari/leetcode-problem-solutions

This repository contains a comprehensive collection of solutions to LeetCode problems, crafted with clarity and efficiency in mind. Each solution is written in a clean, readable format and includes insights into time and space complexity, making it an ideal resource for technical interview preparation, algorithm practice, and self-paced learning.
https://github.com/tareqalkushari/leetcode-problem-solutions

algorithm-practice algorithms arrays binary-search coding-interview competitive-programming cpp data-structures dynamic-programming graph-algorithms hashmap interview-preparation java leetcode leetcode-solutions problem-solving python recursion strings technical-interview

Last synced: 3 months ago
JSON representation

This repository contains a comprehensive collection of solutions to LeetCode problems, crafted with clarity and efficiency in mind. Each solution is written in a clean, readable format and includes insights into time and space complexity, making it an ideal resource for technical interview preparation, algorithm practice, and self-paced learning.

Awesome Lists containing this project

README

          

# LeetCode Problem Solutions

## Overview

This repository contains a collection of solutions to various LeetCode problems implemented in both Java and C++. The solutions cover a range of algorithmic challenges commonly found on LeetCode, including string manipulation, array processing, and classic problem-solving patterns.

## Repository Structure

The repository is organized by programming language and then further by problem/topic:

```
├── C++
│ ├── AddTwoNumbers/
│ ├── MedianoTwoSortedArrays/
│ ├── TwoSum/
│ ├── longestSubstring/
│ └── README.md
├── Java/
│ ├── ConditionalsIf/
│ ├── StringSolving/
│ └── README.md
├── docs/
│ └── doc.md
├── translations/
│ └── README_ar.md
├── LICENSE
└── README.md
```

### Key Solution Folders

- **C++/AddTwoNumbers/**
Solution for the "Add Two Numbers" problem using singly-linked lists.
- **C++/MedianoTwoSortedArrays/**
Solution for finding the median of two sorted arrays.
- **C++/TwoSum/**
Solution for the classic "Two Sum" problem.
- **C++/longestSubstring/**
Implementation for finding the length of the longest substring without repeating characters.
- **Java/ConditionalsIf/**
Solutions demonstrating conditional logic, including a Blackjack card game logic.
- **Java/StringSolving/**
String manipulation problems and log formatting utilities.

## How to Use

Browse the language-specific folders (`C++` and `Java`) to find implementations of various LeetCode problems. Each problem typically contains a `README.md` and source code files demonstrating one or more approaches.

### Example: Running a Solution in Java

Navigate to the relevant Java folder and execute the main class, for example:
```bash
cd Java/StringSolving/src/main/java/com/mycompany/stringsolving
javac LogLevels.java
java com.mycompany.stringsolving.LogLevels
```

### Example: Running a Solution in C++

The C++ folders may contain Java code for demonstration purposes. Follow the same steps as above, replacing the package paths as needed.

## Documentation & Translations

- Additional documentation is available in the `docs/` directory.
- An Arabic translation of the readme is available under `translations/README_ar.md`.

## License

This repository is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Author

Maintained by [Tareq Al-Kushari](https://github.com/TareqAlKushari).

---

Feel free to explore, use, and contribute to these solutions to improve your algorithmic skills!