This repository contains my LeetCode problem solutions implemented in JavaScript and TypeScript.
Each problem includes:
- Problem description
- One or more solution approaches
- Time and space complexity analysis
🔗 LeetCode Profile: https://leetcode.com/u/knightwalkerx/
Problems are organized by ID using the following format:
LC-0001_2Sum/
├── description.md
├── solution_v1.js
├── solution_v1.ts
├── solution_v2.js
└── solution_v2.tsEach problem may contain multiple solution versions:
v1→ Initial or brute-force approachv2+→ Optimized or refactored solutions
<type>: <problem-name> - <approach> <complexity> [#problem-number]
Example:
- feat: Two Sum - HashMap O(n) [#LC-0001]
- perf: Product of Array Except Self - Optimized O(n) [#LC-0238]
- refactor: Reverse Linked List - Cleaner iteration [#LC-0206]
Must be one of the following:
- feat: New problem solution
- refactor: Improved solution
- perf: Better time/space complexity
- docs: Documentation only changes (example scopes: .md files)
- fs: File system changes, e.g. renaming files
<type>: <problem-name> - <approach> <complexity> [#problem-number]
Example:
- feat: Two Sum - HashMap O(n) [#LC-0001]
- perf: Product of Array Except Self - Optimized O(n) [#LC-0238]
- refactor: Reverse Linked List - Cleaner iteration [#LC-0206]
Must be one of the following:
- feat: New problem solution
- refactor: Improved solution
- perf: Better time/space complexity
- docs: Documentation only changes (e.g. scopes: .md files)
- fs: File system changes, (e.g. renaming files)