🗣️ Language | 🔗 Repo Link | 👀 Contributors | 🧠 Quantity |
---|---|---|---|
Python | Python | @muffafa | 14 |
Java | JAVA | @cagridemirtash | 3 |
Javascript | Javascript | @kaanncavdar | 4 |
Rust | Rust | @sektor7k | 13 |
C++ | Cpp | @sametaydinq | 0 |
Welcome to the solutions of leetcode algorithms.
I suggest cloning the repository locally to work with it, but you can easily look at any solution you want without cloning it. Simply press Ctrl + F
and type the name of the question or its ID. Each folder includes an .md file that you can click on to go to the Leetcode website. There are two parts of questions:
- Problem:
This part includes the definition of the problem, example cases, input and output examples, constraints, and follow-up information. - Solution:
This part includes a table to navigate to the solutions.
Each .md file for a solution includes:
- Header (that navigates to the online explanation of the solution)
- Approach (describing the approach to solving the problem)
- Complexity (determining the time and space complexity of the solution)
- Code (the actual solution to the problem)
git clone https://github.com/cukurovablock/awesome-leetcode-algorithms-solutions.git
- markdownlint
- Markdown Table
- Markdown All in One
- Markdown Preview Github Styling
- Auto-Open Markdown Preview
- vscode-icons
How to Contribute to Open Source Projects on GitHub
You can create a custom snippet for .md files in Visual Studio Code:
- Open Visual Studio Code, click "File" > "Preferences" > "User Snippets".
- Select "Markdown" from the list of languages.
- Add the following code to create a basic markdown snippet.
- You can easily type
mdproblem
to create a problem template andmdsolution
to create a solution template.mdexample
,mdexamplewithexplanation
andmdheading
snippets also can be used. - Now you can easily start contributing!
{
"Leetcode Problem Template": {
"prefix": "mdproblem",
"body": [
"# [${6:Header}](${7:Link})",
"",
"## 🚨 Problem",
"<!-- Explanation of problem. -->",
"${1:Explain the problem}",
"",
"**Example 1:**",
"<!-- An example of problem. -->",
"",
">**Input:** ${2} </br> <!-- Input example. -->",
"**Output:** ${3} </br> <!-- Output example. -->",
"**Explanation:** ${4} <!-- Basic explanation of example. -->",
"",
"**Constraints:**",
"<!-- Constraints of problem. -->",
"- ${5}",
"",
"**Follow-up:** ",
"<!-- Do more! -->",
"",
"## 🔐 Solutions",
"<!-- Solutions of problem and their links. -->",
"",
"| ID | METHOD |",
"| :-- | :--------------------: |",
"| 1 | [example](1-answer.md) |",
""
],
"description": "It creates a problem template for leetcode"
},
"Leetcode Solution Template": {
"prefix": "mdsolution",
"body": [
"# [${6:Header}](${7:link})",
"",
"## 🧑🏻💻 Approach",
"<!-- Describe your approach to solving the problem. -->",
"${1:Explain the approach}",
"",
"## 🔐 Code",
"",
"``` ${2:Programming language}",
"${3:printf(\"Hello World\");}",
"```",
"",
"## 🧩 Complexity",
"",
"- Time complexity:",
"<!-- Add your time complexity here, e.g. \\$O(n)$ -->",
"${4:Time Complexity}",
"",
"- Space complexity:",
"<!-- Add your space complexity here, e.g. \\$O(n)$ -->",
"${5:Space Complexity}",
""
],
"description": "It creates a solution template for leetcode problem"
},
"Leetcode Example Template": {
"prefix": "mdexample",
"body": [
"**Example ${1}:**",
"<!-- An example of problem. -->",
"",
">**Input:** ${2} </br> <!-- Input example. -->",
"**Output:** ${3} </br> <!-- Output example. -->",
],
"description": "It creates a example template for leetcode problem"
},
"Leetcode Example Template w/ Explanation": {
"prefix": "mdexamplewithexplanation",
"body": [
"**Example ${1}:**",
"<!-- An example of problem. -->",
"",
">**Input:** ${2} </br> <!-- Input example. -->",
"**Output:** ${3} </br> <!-- Output example. -->",
"**Explanation:** ${4} <!-- Basic explanation of example. -->",
""
],
"description": "It creates a example template with explanation for leetcode problem"
},
"Leetcode Heading Template for Solution": {
"prefix": "mdheading",
"body": [
"✅ ${1:Method} to solve the 🧑🏻💻 ${2:Question Name} Problem on 🐍 ${3:Language Name}"
],
"description": "It creates a heading for leetcode solution"
}
}