UNPKG

leet-code-read-me-generator

Version:

A CLI tool to automatically generate a structured README for LeetCode solutions, making it easier to document your coding challenges and projects.

439 lines (425 loc) 22 kB
<h1 align="center">🧠 LeetCode README Generator</h1> <p align="center"> <img src="https://img.shields.io/badge/Auto--Generate-LeetCode%20README-blue?style=for-the-badge" alt="Generator Badge" /> <img src="https://img.shields.io/badge/Built%20With-Node.js-green?style=for-the-badge" alt="Node.js" /> <img src="https://img.shields.io/badge/Last%20Updated-2025--05--08-brightgreen?style=for-the-badge" alt="Updated" /> </p> <p align="center"><b>Automatically create a colorful and structured README.md from your solved LeetCode problems 🚀</b></p> 💡 Features 🔄 Fetches all LeetCode questions via the official API 🧠 Reads your GitHub repo file structure (make sure your solution filename has the number of the question) 🧩 Matches filenames with LeetCode question IDs 🎨 Builds a Bootstrap-powered HTML table with colorful badges 📄 Generates a beautiful README.md file <h4> Step One </h4> <code>npm install -g leetcode-readme-generator</code> <h4> Step Two </h4> <code>leetcode-readme -git GitHub_API_URL -tech favLang </code> Supported languages : <code> const supportedLanguages = ["javascript", "python", "java", "c++", "c#", "go", "rust", "typescript", "php", "ruby", "swift", "kotlin", "dart", "scala", "shell"];</code> <h4 Example : </h4> <code>leetcode-readme -git https://api.github.com/repos/yourusername/yourLeetCodeRepoName/contents -t Java</code> <hr> <h1 align="center">🚀 My LeetCode Journey</h1> <p align="center"><img src="https://img.shields.io/badge/Problems%20Solve%2066/3540-blueviolet?style=for-the-badge" alt="Problems Solved" /> <img src="https://img.shields.io/badge/Language-TypeScript-3178C6?style=for-the-badge" alt="TypeScript" /> <img src="https://img.shields.io/badge/Last%20Updated-May%202025-brightgreen?style=for-the-badge" alt="Updated" /></p> <p align="center"><b>A visually organized collection of my LeetCode solutions 🚀</b><br /><i>Click through each problem to see the code, patterns, and explanations!</i></p> <hr /> <table class='table table-striped table-hover'> <thead> <td> Question number </td> <td> Question Title </td> <td> Difficulty </td> <td> Link to description </td> </thead> <tbody> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q1.ts'> 1 </a></th> <td> Two Sum</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/two-sum/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q3.ts'> 3 </a></th> <td> Longest Substring Without Repeating Characters</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/longest-substring-without-repeating-characters/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q4.ts'> 4 </a></th> <td> Median of Two Sorted Arrays</td> <td> <span class="badge text-bg-danger">Hard</span></td> <td>https://leetcode.com/problems/median-of-two-sorted-arrays/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q5.ts'> 5 </a></th> <td> Longest Palindromic Substring</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/longest-palindromic-substring/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q6.ts'> 6 </a></th> <td> Zigzag Conversion</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/zigzag-conversion/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q7.ts'> 7 </a></th> <td> Reverse Integer</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/reverse-integer/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q8.ts'> 8 </a></th> <td> String to Integer (atoi)</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/string-to-integer-atoi/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q9.ts'> 9 </a></th> <td> Palindrome Number</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/palindrome-number/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q11.ts'> 11 </a></th> <td> Container With Most Water</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/container-with-most-water/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q12.ts'> 12 </a></th> <td> Integer to Roman</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/integer-to-roman/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q13.ts'> 13 </a></th> <td> Roman to Integer</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/roman-to-integer/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q14.ts'> 14 </a></th> <td> Longest Common Prefix</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/longest-common-prefix/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q16.ts'> 16 </a></th> <td> 3Sum Closest</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/3sum-closest/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q17.ts'> 17 </a></th> <td> Letter Combinations of a Phone Number</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/letter-combinations-of-a-phone-number/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q19.ts'> 19 </a></th> <td> Remove Nth Node From End of List</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/remove-nth-node-from-end-of-list/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q20.ts'> 20 </a></th> <td> Valid Parentheses</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/valid-parentheses/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q21.ts'> 21 </a></th> <td> Merge Two Sorted Lists</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/merge-two-sorted-lists/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q22.ts'> 22 </a></th> <td> Generate Parentheses</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/generate-parentheses/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q23.ts'> 23 </a></th> <td> Merge k Sorted Lists</td> <td> <span class="badge text-bg-danger">Hard</span></td> <td>https://leetcode.com/problems/merge-k-sorted-lists/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q24.ts'> 24 </a></th> <td> Swap Nodes in Pairs</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/swap-nodes-in-pairs/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q27.ts'> 27 </a></th> <td> Remove Element</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/remove-element/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q28.ts'> 28 </a></th> <td> Find the Index of the First Occurrence in a String</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q31.ts'> 31 </a></th> <td> Next Permutation</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/next-permutation/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q34.ts'> 34 </a></th> <td> Find First and Last Position of Element in Sorted Array</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q35.ts'> 35 </a></th> <td> Search Insert Position</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/search-insert-position/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q41.ts'> 41 </a></th> <td> First Missing Positive</td> <td> <span class="badge text-bg-danger">Hard</span></td> <td>https://leetcode.com/problems/first-missing-positive/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q48.ts'> 48 </a></th> <td> Rotate Image</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/rotate-image/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q49.ts'> 49 </a></th> <td> Group Anagrams</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/group-anagrams/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q56.ts'> 56 </a></th> <td> Merge Intervals</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/merge-intervals/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q57.ts'> 57 </a></th> <td> Insert Interval</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/insert-interval/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q58.ts'> 58 </a></th> <td> Length of Last Word</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/length-of-last-word/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q61.ts'> 61 </a></th> <td> Rotate List</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/rotate-list/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q66.ts'> 66 </a></th> <td> Plus One</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/plus-one/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q71.ts'> 71 </a></th> <td> Simplify Path</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/simplify-path/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q73.ts'> 73 </a></th> <td> Set Matrix Zeroes</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/set-matrix-zeroes/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q74.ts'> 74 </a></th> <td> Search a 2D Matrix</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/search-a-2d-matrix/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q75.ts'> 75 </a></th> <td> Sort Colors</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/sort-colors/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q77.cpp'> 77 </a></th> <td> Combinations</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/combinations/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q78.cpp'> 78 </a></th> <td> Subsets</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/subsets/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q80.ts'> 80 </a></th> <td> Remove Duplicates from Sorted Array II</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q82.ts'> 82 </a></th> <td> Remove Duplicates from Sorted List II</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q83.ts'> 83 </a></th> <td> Remove Duplicates from Sorted List</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/remove-duplicates-from-sorted-list/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q86.ts'> 86 </a></th> <td> Partition List</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/partition-list/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q92.ts'> 92 </a></th> <td> Reverse Linked List II</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/reverse-linked-list-ii/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q125.ts'> 125 </a></th> <td> Valid Palindrome</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/valid-palindrome/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q136.ts'> 136 </a></th> <td> Single Number</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/single-number/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q137.ts'> 137 </a></th> <td> Single Number II</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/single-number-ii/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q141.ts'> 141 </a></th> <td> Linked List Cycle</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/linked-list-cycle/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q143.ts'> 143 </a></th> <td> Reorder List</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/reorder-list/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q151.ts'> 151 </a></th> <td> Reverse Words in a String</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/reverse-words-in-a-string/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q153.ts'> 153 </a></th> <td> Find Minimum in Rotated Sorted Array</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q162.ts'> 162 </a></th> <td> Find Peak Element</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/find-peak-element/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q164.ts'> 164 </a></th> <td> Maximum Gap</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/maximum-gap/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q165.ts'> 165 </a></th> <td> Compare Version Numbers</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/compare-version-numbers/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q187.ts'> 187 </a></th> <td> Repeated DNA Sequences</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/repeated-dna-sequences/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q189.ts'> 189 </a></th> <td> Rotate Array</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/rotate-array/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q206.ts'> 206 </a></th> <td> Reverse Linked List</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/reverse-linked-list/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q223.ts'> 223 </a></th> <td> Rectangle Area</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/rectangle-area/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q238.ts'> 238 </a></th> <td> Product of Array Except Self</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/product-of-array-except-self/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q240.ts'> 240 </a></th> <td> Search a 2D Matrix II</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/search-a-2d-matrix-ii/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q242.ts'> 242 </a></th> <td> Valid Anagram</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/valid-anagram/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q283.ts'> 283 </a></th> <td> Move Zeroes</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/move-zeroes/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q378.ts'> 378 </a></th> <td> Kth Smallest Element in a Sorted Matrix</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q442.ts'> 442 </a></th> <td> Find All Duplicates in an Array</td> <td> <span class="badge text-bg-warning">Medium</span></td> <td>https://leetcode.com/problems/find-all-duplicates-in-an-array/description/ </td> </tr> <tr> <th> <a href='https://github.com/pSkywalker/leetCodeSolutions/blob/main/q500.ts'> 500 </a></th> <td> Keyboard Row</td> <td> <span class="badge text-bg-success">Easy</span></td> <td>https://leetcode.com/problems/keyboard-row/description/ </td> </tr> </tbody> </table>