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.
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
- 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.
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.
Navigate to the relevant Java folder and execute the main class, for example:
cd Java/StringSolving/src/main/java/com/mycompany/stringsolving
javac LogLevels.java
java com.mycompany.stringsolving.LogLevels
The C++ folders may contain Java code for demonstration purposes. Follow the same steps as above, replacing the package paths as needed.
- Additional documentation is available in the
docs/
directory. - An Arabic translation of the readme is available under
translations/README_ar.md
.
This repository is licensed under the MIT License. See the LICENSE file for details.
Maintained by Tareq Al-Kushari.
Feel free to explore, use, and contribute to these solutions to improve your algorithmic skills!