{"id":21626035,"url":"https://github.com/lotrien/leet-code","last_synced_at":"2025-03-18T20:21:26.186Z","repository":{"id":128419419,"uuid":"227829932","full_name":"lotrien/leet-code","owner":"lotrien","description":"Algorithm and data structure problems from https://leetcode.com solved in JavaScript","archived":false,"fork":false,"pushed_at":"2021-01-22T21:14:34.000Z","size":223,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T22:41:53.792Z","etag":null,"topics":["algorithms","data-structures","javascript","js","leetcode"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lotrien.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-13T11:57:19.000Z","updated_at":"2021-01-22T21:14:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"a66e63d7-0a14-4eb7-9781-03f0fe14b6aa","html_url":"https://github.com/lotrien/leet-code","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lotrien%2Fleet-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lotrien%2Fleet-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lotrien%2Fleet-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lotrien%2Fleet-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lotrien","download_url":"https://codeload.github.com/lotrien/leet-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244297871,"owners_count":20430347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","data-structures","javascript","js","leetcode"],"created_at":"2024-11-25T01:11:46.934Z","updated_at":"2025-03-18T20:21:26.166Z","avatar_url":"https://github.com/lotrien.png","language":"JavaScript","readme":"# Solved problems\n\n## Easy list:\n\n* [1. Two Sum](https://leetcode.com/problems/two-sum/)\n* [7. Reverse Integer](https://leetcode.com/problems/reverse-integer/)\n* [14. Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/)\n* [20. Valid Parentheses](https://leetcode.com/problems/valid-parentheses/)\n* [21. Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/)\n* [26. Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/)\n* [53. Maximum Subarray](https://leetcode.com/problems/maximum-subarray/)\n* [69. Sqrt(x)](https://leetcode.com/problems/sqrtx/)\n* [70. Climbing Stairs](https://leetcode.com/problems/climbing-stairs/)\n* [83. Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/)\n* [88. Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array/)\n* [101. Symmetric Tree](https://leetcode.com/problems/symmetric-tree/)\n* [104. Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/)\n* [107. Binary Tree Level Order Traversal II](https://leetcode.com/problems/binary-tree-level-order-traversal-ii/)\n* [108. Convert Sorted Array to Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/)\n* [110. Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/)\n* [111. Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree/)\n* [112. Path Sum](https://leetcode.com/problems/path-sum/)\n* [118. Pascal's Triangle](https://leetcode.com/problems/pascals-triangle/)\n* [119. Pascal's Triangle II](https://leetcode.com/problems/pascals-triangle-ii/)\n* [121. Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)\n* [125. Valid Palindrome](https://leetcode.com/problems/valid-palindrome/)\n* [136. Single Number](https://leetcode.com/problems/single-number/)\n* [141. Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/)\n* [155. Min Stack](https://leetcode.com/problems/min-stack/)\n* [160. Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists/)\n* [167. Two Sum II - Input array is sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/)\n* [170. Two Sum III - Data structure design](https://leetcode.com/problems/two-sum-iii-data-structure-design/)\n* [171. Excel Sheet Column Number](https://leetcode.com/problems/excel-sheet-column-number/)\n* [198. House Robber](https://leetcode.com/problems/house-robber/)\n* [202. Happy Number](https://leetcode.com/problems/happy-number/)\n* [203. Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/)\n* [205. Isomorphic Strings](https://leetcode.com/problems/isomorphic-strings/)\n* [206. Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/)\n* [219. Contains Duplicate II](https://leetcode.com/problems/contains-duplicate-ii/)\n* [226. Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/)\n* [234. Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/)\n* [235. Lowest Common Ancestor of a Binary Search Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/)\n* [242. Valid Anagram](https://leetcode.com/problems/valid-anagram/)\n* [246. Strobogrammatic Number](https://leetcode.com/problems/strobogrammatic-number/)\n* [252. Meeting Rooms](https://leetcode.com/problems/meeting-rooms/)\n* [256. Paint House](https://leetcode.com/problems/paint-house/)\n* [257. Binary Tree Paths](https://leetcode.com/problems/binary-tree-paths/)\n* [266. Palindrome Permutation](https://leetcode.com/problems/palindrome-permutation/)\n* [268. Missing Number](https://leetcode.com/problems/missing-number/)\n* [270. Closest Binary Search Tree Value](https://leetcode.com/problems/closest-binary-search-tree-value/)\n* [278. First Bad Version](https://leetcode.com/problems/first-bad-version/)\n* [283. Move Zeroes](https://leetcode.com/problems/move-zeroes/)\n* [344. Reverse String](https://leetcode.com/problems/reverse-string/)\n* [345. Reverse Vowels of a String](https://leetcode.com/problems/reverse-vowels-of-a-string/)\n* [346. Moving Average from Data Stream](https://leetcode.com/problems/moving-average-from-data-stream/)\n* [349. Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/)\n* [350. Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/)\n* [359. Logger Rate Limiter](https://leetcode.com/problems/logger-rate-limiter/)\n* [387. First Unique Character in a String](https://leetcode.com/problems/first-unique-character-in-a-string/)\n* [389. Find the Difference](https://leetcode.com/problems/find-the-difference/)\n* [404. Sum of Left Leaves](https://leetcode.com/problems/sum-of-left-leaves/)\n* [412. Fizz Buzz](https://leetcode.com/problems/fizz-buzz/)\n* [437. Path Sum III](https://leetcode.com/problems/path-sum-iii/)\n* [448. Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/)\n* [463. Island Perimeter](https://leetcode.com/problems/island-perimeter/)\n* [509. Fibonacci Number](https://leetcode.com/problems/fibonacci-number/)\n* [543. Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/)\n* [572. Subtree of Another Tree](https://leetcode.com/problems/subtree-of-another-tree/)\n* [599. Minimum Index Sum of Two Lists](https://leetcode.com/problems/minimum-index-sum-of-two-lists/)\n* [617. Merge Two Binary Trees](https://leetcode.com/problems/merge-two-binary-trees/)\n* [652. Find Duplicate Subtrees](https://leetcode.com/problems/find-duplicate-subtrees/)\n* [671. Second Minimum Node In a Binary Tree](https://leetcode.com/problems/second-minimum-node-in-a-binary-tree/)\n* [686. Repeated String Match](https://leetcode.com/problems/repeated-string-match/)\n* [687. Longest Univalue Path](https://leetcode.com/problems/longest-univalue-path/)\n* [700. Search in a Binary Search Tree](https://leetcode.com/problems/search-in-a-binary-search-tree/)\n* [705. Design HashSet](https://leetcode.com/problems/design-hashset/)\n* [716. Max Stack](https://leetcode.com/problems/max-stack/)\n* [746. Min Cost Climbing Stairs](https://leetcode.com/problems/min-cost-climbing-stairs/)\n* [771. Jewels and Stones](https://leetcode.com/problems/jewels-and-stones/)\n* [819. Most Common Word](https://leetcode.com/problems/most-common-word/)\n* [844. Backspace String Compare](https://leetcode.com/problems/backspace-string-compare/)\n* [876. Middle of the Linked List](https://leetcode.com/problems/middle-of-the-linked-list/)\n* [905. Sort Array By Parity](https://leetcode.com/problems/sort-array-by-parity/)\n* [938. Range Sum of BST](https://leetcode.com/problems/range-sum-of-bst/)\n* [941. Valid Mountain Array](https://leetcode.com/problems/valid-mountain-array/)\n* [965. Univalued Binary Tree](https://leetcode.com/problems/univalued-binary-tree/)\n* [1047. Remove All Adjacent Duplicates In String](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/)\n* [1056. Confusing Number](https://leetcode.com/problems/confusing-number/)\n* [1086. High Five](https://leetcode.com/problems/high-five/)\n* [1089. Duplicate Zeros](https://leetcode.com/problems/duplicate-zeros/)\n* [1207. Unique Number of Occurrences](https://leetcode.com/problems/unique-number-of-occurrences/)\n* [1281. Subtract the Product and Sum of Digits of an Integer](https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/)\n* [1290. Convert Binary Number in a Linked List to Integer](https://leetcode.com/problems/convert-binary-number-in-a-linked-list-to-integer/)\n* [1295. Find Numbers with Even Number of Digits](https://leetcode.com/problems/find-numbers-with-even-number-of-digits/)\n* [1299. Replace Elements with Greatest Element on Right Side](https://leetcode.com/problems/replace-elements-with-greatest-element-on-right-side/)\n* [1304. Find N Unique Integers Sum up to Zero](https://leetcode.com/problems/find-n-unique-integers-sum-up-to-zero/)\n* [1309. Decrypt String from Alphabet to Integer Mapping](https://leetcode.com/problems/decrypt-string-from-alphabet-to-integer-mapping/)\n* [1317. Convert Integer to the Sum of Two No-Zero Integers](https://leetcode.com/problems/convert-integer-to-the-sum-of-two-no-zero-integers/)\n* [1323. Maximum 69 Number](https://leetcode.com/problems/maximum-69-number/)\n* [1331. Rank Transform of an Array](https://leetcode.com/problems/rank-transform-of-an-array/)\n* [1342. Number of Steps to Reduce a Number to Zero](https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/)\n* [1356. Sort Integers by The Number of 1 Bits](https://leetcode.com/problems/sort-integers-by-the-number-of-1-bits/)\n* [5143. Decompress Run-Length Encoded List](https://leetcode.com/problems/decompress-run-length-encoded-list/)\n\n## Medium list:\n* [2. Add Two Numbers](https://leetcode.com/problems/add-two-numbers/)\n* [3. Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/)\n* [11. Container With Most Water](https://leetcode.com/problems/container-with-most-water/)\n* [19. Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/)\n* [22. Generate Parentheses](https://leetcode.com/problems/generate-parentheses/)\n* [24. Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/)\n* [36. Valid Sudoku](https://leetcode.com/problems/valid-sudoku/)\n* [46. Permutations](https://leetcode.com/problems/permutations/)\n* [49. Group Anagrams](https://leetcode.com/problems/group-anagrams/)\n* [50. Pow(x, n)](https://leetcode.com/problems/powx-n/)\n* [56. Merge Intervals](https://leetcode.com/problems/merge-intervals/)\n* [61. Rotate List](https://leetcode.com/problems/rotate-list/)\n* [82. Remove Duplicates from Sorted List II](https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/)\n* [94. Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/)\n* [96. Unique Binary Search Trees](https://leetcode.com/problems/unique-binary-search-trees/)\n* [98. Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/)\n* [102. Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/)\n* [105. Construct Binary Tree from Preorder and Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/)\n* [106. Construct Binary Tree from Inorder and Postorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/)\n* [129. Sum Root to Leaf Numbers](https://leetcode.com/problems/sum-root-to-leaf-numbers/)\n* [138. Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/)\n* [142. Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/)\n* [144. Binary Tree Preorder Traversal](https://leetcode.com/problems/binary-tree-preorder-traversal/)\n* [146. LRU Cache](https://leetcode.com/problems/lru-cache/)\n* [150. Evaluate Reverse Polish Notation](https://leetcode.com/problems/evaluate-reverse-polish-notation/)\n* [159. Longest Substring with At Most Two Distinct Characters](https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters/)\n* [173. Binary Search Tree Iterator](https://leetcode.com/problems/binary-search-tree-iterator/)\n* [200. Number of Islands](https://leetcode.com/problems/number-of-islands/)\n* [279. Perfect Squares](https://leetcode.com/problems/perfect-squares/)\n* [280. Wiggle Sort](https://leetcode.com/problems/wiggle-sort/)\n* [286. Walls and Gates](https://leetcode.com/problems/walls-and-gates/)\n* [230. Kth Smallest Element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/)\n* [236. Lowest Common Ancestor of a Binary Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/)\n* [238. Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/)\n* [249. Group Shifted Strings](https://leetcode.com/problems/group-shifted-strings/)\n* [250. Count Univalue Subtrees](https://leetcode.com/problems/count-univalue-subtrees/)\n* [253. Meeting Rooms II](https://leetcode.com/problems/meeting-rooms-ii/)\n* [288. Unique Word Abbreviation](https://leetcode.com/problems/unique-word-abbreviation/)\n* [328. Odd Even Linked List](https://leetcode.com/problems/odd-even-linked-list/)\n* [379. Design Phone Directory](https://leetcode.com/problems/design-phone-directory/)\n* [380. Insert Delete GetRandom O(1)](https://leetcode.com/problems/insert-delete-getrandom-o1/)\n* [394. Decode String](https://leetcode.com/problems/decode-string/)\n* [430. Flatten a Multilevel Doubly Linked List](https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list/)\n* [454. 4Sum II](https://leetcode.com/problems/4sum-ii/)\n* [536. Construct Binary Tree from String](https://leetcode.com/problems/construct-binary-tree-from-string/)\n* [622. Design Circular Queue](https://leetcode.com/problems/design-circular-queue/)\n* [692. Top K Frequent Words](https://leetcode.com/problems/top-k-frequent-words/)\n* [701. Insert into a Binary Search Tree](https://leetcode.com/problems/insert-into-a-binary-search-tree/)\n* [707. Design Linked List](https://leetcode.com/problems/design-linked-list/)\n* [708. Insert into a Sorted Circular Linked List](https://leetcode.com/problems/insert-into-a-sorted-circular-linked-list/)\n* [731. My Calendar II](https://leetcode.com/problems/my-calendar-ii/)\n* [739. Daily Temperatures](https://leetcode.com/problems/daily-temperatures/)\n* [841. Keys and Rooms](https://leetcode.com/problems/keys-and-rooms/)\n* [904. Fruit Into Baskets](https://leetcode.com/problems/fruit-into-baskets/)\n* [939. Minimum Area Rectangle](https://leetcode.com/problems/minimum-area-rectangle/)\n* [1007. Minimum Domino Rotations For Equal Row](https://leetcode.com/problems/minimum-domino-rotations-for-equal-row/)\n* [1008. Construct Binary Search Tree from Preorder Traversal](https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal/)\n* [1055. Shortest Way to Form String](https://leetcode.com/problems/shortest-way-to-form-string/)\n* [1146. Snapshot Array](https://leetcode.com/problems/snapshot-array/)\n* [1161. Maximum Level Sum of a Binary Tree](https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree/)\n* [1249. Minimum Remove to Make Valid Parentheses](https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses/)\n* [1302. Deepest Leaves Sum](https://leetcode.com/problems/deepest-leaves-sum/)\n* [1305. All Elements in Two Binary Search Trees](https://leetcode.com/problems/all-elements-in-two-binary-search-trees/)\n* [1306. Jump Game III](https://leetcode.com/problems/jump-game-iii/)\n* [1310. XOR Queries of a Subarray](https://leetcode.com/problems/xor-queries-of-a-subarray/)\n* [1324. Print Words Vertically](https://leetcode.com/problems/print-words-vertically/)\n* [1325. Delete Leaves With a Given Value](https://leetcode.com/problems/delete-leaves-with-a-given-value/)\n* [1328. Break a Palindrome](https://leetcode.com/problems/break-a-palindrome/)\n* [1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold](https://leetcode.com/problems/number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold/)\n* [1344. Angle Between Hands of a Clock](https://leetcode.com/problems/angle-between-hands-of-a-clock/)\n* [1357. Apply Discount Every n Orders](https://leetcode.com/problems/apply-discount-every-n-orders/)\n* [5145. Sum of Nodes with Even-Valued Grandparent](https://leetcode.com/problems/sum-of-nodes-with-even-valued-grandparent/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flotrien%2Fleet-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flotrien%2Fleet-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flotrien%2Fleet-code/lists"}