Skip to content

Knightwalker/leetcode

Repository files navigation

Leetcode

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/

I. Structure

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.ts

Each problem may contain multiple solution versions:

  • v1 → Initial or brute-force approach
  • v2+ → Optimized or refactored solutions

II. Contributing

II.1. Commit Message Format

<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]

II.1.2. Type

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

II. Contributing

II.1. Commit Message Format

<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]

II.1.2. Type

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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors