Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 4.99 KB

File metadata and controls

40 lines (31 loc) · 4.99 KB

LeetCode

LeetCode solutions with time/space complexity and tags.

Problem Solution Time Space Tags
0001. Two Sum ✅Done O(n) O(n) Hashing, 2ptr
0002. Add Two Numbers ❌None
0007. Reverse Integer ⚠️Some O(log n) O(1)
0009. Palindrome Number ✅Done O(log n) O(1) Math
0013. Roman to Integer ✅Done O(1) O(1) String, Sliding
0014. Longest Common Prefix ⚠️Some
0020. Valid Parentheses ✅Done O(n) O(n) Stack
0021. Merge Two Sorted Lists ✅Done O(m+n) O(1) LL, 2ptr
0027. Remove Element ⚠️Some O(n) O(1) 2ptr
0066. Plus One ⚠️Some O(n) O(1) Math
0089. Gray Code ✅Done O(2^n) O(2^n) Math
0121. Best Time to Buy and Sell Stock ⚠️Some O(n) O(1) 2ptr, DP
0136. Single Number ⚠️Some O(1) O(1) Bits
0217. Contains Duplicate ⚠️Some O(n) O(n) Hashing
0249. Group Shifted Strings ⚠️Some
0344. Reverse String ⚠️Some O(n) O(1) 2ptr, Recursion
0628. Maximum Product of Three Numbers ⚠️Some O(n) O(1) Greedy
0692. Top K Frequent Words ⚠️Some

Manual

All scripts marked ✅ are clean (Ruff), tested (CI), and accepted (LC).

Hints are numbered as (#) for easy referrals at inline comments.

Scripts may contain more than 1 sol or follow-up Q.

CLI smoke test batch validates all given test cases (plus custom edge cases) for all solutions presented.

> python ~/Git/leetcode/0001.py --> ✅ (if all solutions pass all testcases)

License

This project is licensed under the BSD 3-Clause License.