Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lotrien/leet-code

Algorithm and data structure problems from https://leetcode.com solved in JavaScript
https://github.com/lotrien/leet-code

algorithms data-structures javascript js leetcode

Last synced: 2 days ago
JSON representation

Algorithm and data structure problems from https://leetcode.com solved in JavaScript

Awesome Lists containing this project

README

        

# Solved problems

## Easy list:

* [1. Two Sum](https://leetcode.com/problems/two-sum/)
* [7. Reverse Integer](https://leetcode.com/problems/reverse-integer/)
* [14. Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/)
* [20. Valid Parentheses](https://leetcode.com/problems/valid-parentheses/)
* [21. Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/)
* [26. Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/)
* [53. Maximum Subarray](https://leetcode.com/problems/maximum-subarray/)
* [69. Sqrt(x)](https://leetcode.com/problems/sqrtx/)
* [70. Climbing Stairs](https://leetcode.com/problems/climbing-stairs/)
* [83. Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/)
* [88. Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array/)
* [101. Symmetric Tree](https://leetcode.com/problems/symmetric-tree/)
* [104. Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/)
* [107. Binary Tree Level Order Traversal II](https://leetcode.com/problems/binary-tree-level-order-traversal-ii/)
* [108. Convert Sorted Array to Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/)
* [110. Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/)
* [111. Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree/)
* [112. Path Sum](https://leetcode.com/problems/path-sum/)
* [118. Pascal's Triangle](https://leetcode.com/problems/pascals-triangle/)
* [119. Pascal's Triangle II](https://leetcode.com/problems/pascals-triangle-ii/)
* [121. Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)
* [125. Valid Palindrome](https://leetcode.com/problems/valid-palindrome/)
* [136. Single Number](https://leetcode.com/problems/single-number/)
* [141. Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/)
* [155. Min Stack](https://leetcode.com/problems/min-stack/)
* [160. Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists/)
* [167. Two Sum II - Input array is sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/)
* [170. Two Sum III - Data structure design](https://leetcode.com/problems/two-sum-iii-data-structure-design/)
* [171. Excel Sheet Column Number](https://leetcode.com/problems/excel-sheet-column-number/)
* [198. House Robber](https://leetcode.com/problems/house-robber/)
* [202. Happy Number](https://leetcode.com/problems/happy-number/)
* [203. Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/)
* [205. Isomorphic Strings](https://leetcode.com/problems/isomorphic-strings/)
* [206. Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/)
* [219. Contains Duplicate II](https://leetcode.com/problems/contains-duplicate-ii/)
* [226. Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/)
* [234. Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/)
* [235. Lowest Common Ancestor of a Binary Search Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/)
* [242. Valid Anagram](https://leetcode.com/problems/valid-anagram/)
* [246. Strobogrammatic Number](https://leetcode.com/problems/strobogrammatic-number/)
* [252. Meeting Rooms](https://leetcode.com/problems/meeting-rooms/)
* [256. Paint House](https://leetcode.com/problems/paint-house/)
* [257. Binary Tree Paths](https://leetcode.com/problems/binary-tree-paths/)
* [266. Palindrome Permutation](https://leetcode.com/problems/palindrome-permutation/)
* [268. Missing Number](https://leetcode.com/problems/missing-number/)
* [270. Closest Binary Search Tree Value](https://leetcode.com/problems/closest-binary-search-tree-value/)
* [278. First Bad Version](https://leetcode.com/problems/first-bad-version/)
* [283. Move Zeroes](https://leetcode.com/problems/move-zeroes/)
* [344. Reverse String](https://leetcode.com/problems/reverse-string/)
* [345. Reverse Vowels of a String](https://leetcode.com/problems/reverse-vowels-of-a-string/)
* [346. Moving Average from Data Stream](https://leetcode.com/problems/moving-average-from-data-stream/)
* [349. Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/)
* [350. Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/)
* [359. Logger Rate Limiter](https://leetcode.com/problems/logger-rate-limiter/)
* [387. First Unique Character in a String](https://leetcode.com/problems/first-unique-character-in-a-string/)
* [389. Find the Difference](https://leetcode.com/problems/find-the-difference/)
* [404. Sum of Left Leaves](https://leetcode.com/problems/sum-of-left-leaves/)
* [412. Fizz Buzz](https://leetcode.com/problems/fizz-buzz/)
* [437. Path Sum III](https://leetcode.com/problems/path-sum-iii/)
* [448. Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/)
* [463. Island Perimeter](https://leetcode.com/problems/island-perimeter/)
* [509. Fibonacci Number](https://leetcode.com/problems/fibonacci-number/)
* [543. Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/)
* [572. Subtree of Another Tree](https://leetcode.com/problems/subtree-of-another-tree/)
* [599. Minimum Index Sum of Two Lists](https://leetcode.com/problems/minimum-index-sum-of-two-lists/)
* [617. Merge Two Binary Trees](https://leetcode.com/problems/merge-two-binary-trees/)
* [652. Find Duplicate Subtrees](https://leetcode.com/problems/find-duplicate-subtrees/)
* [671. Second Minimum Node In a Binary Tree](https://leetcode.com/problems/second-minimum-node-in-a-binary-tree/)
* [686. Repeated String Match](https://leetcode.com/problems/repeated-string-match/)
* [687. Longest Univalue Path](https://leetcode.com/problems/longest-univalue-path/)
* [700. Search in a Binary Search Tree](https://leetcode.com/problems/search-in-a-binary-search-tree/)
* [705. Design HashSet](https://leetcode.com/problems/design-hashset/)
* [716. Max Stack](https://leetcode.com/problems/max-stack/)
* [746. Min Cost Climbing Stairs](https://leetcode.com/problems/min-cost-climbing-stairs/)
* [771. Jewels and Stones](https://leetcode.com/problems/jewels-and-stones/)
* [819. Most Common Word](https://leetcode.com/problems/most-common-word/)
* [844. Backspace String Compare](https://leetcode.com/problems/backspace-string-compare/)
* [876. Middle of the Linked List](https://leetcode.com/problems/middle-of-the-linked-list/)
* [905. Sort Array By Parity](https://leetcode.com/problems/sort-array-by-parity/)
* [938. Range Sum of BST](https://leetcode.com/problems/range-sum-of-bst/)
* [941. Valid Mountain Array](https://leetcode.com/problems/valid-mountain-array/)
* [965. Univalued Binary Tree](https://leetcode.com/problems/univalued-binary-tree/)
* [1047. Remove All Adjacent Duplicates In String](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/)
* [1056. Confusing Number](https://leetcode.com/problems/confusing-number/)
* [1086. High Five](https://leetcode.com/problems/high-five/)
* [1089. Duplicate Zeros](https://leetcode.com/problems/duplicate-zeros/)
* [1207. Unique Number of Occurrences](https://leetcode.com/problems/unique-number-of-occurrences/)
* [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/)
* [1290. Convert Binary Number in a Linked List to Integer](https://leetcode.com/problems/convert-binary-number-in-a-linked-list-to-integer/)
* [1295. Find Numbers with Even Number of Digits](https://leetcode.com/problems/find-numbers-with-even-number-of-digits/)
* [1299. Replace Elements with Greatest Element on Right Side](https://leetcode.com/problems/replace-elements-with-greatest-element-on-right-side/)
* [1304. Find N Unique Integers Sum up to Zero](https://leetcode.com/problems/find-n-unique-integers-sum-up-to-zero/)
* [1309. Decrypt String from Alphabet to Integer Mapping](https://leetcode.com/problems/decrypt-string-from-alphabet-to-integer-mapping/)
* [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/)
* [1323. Maximum 69 Number](https://leetcode.com/problems/maximum-69-number/)
* [1331. Rank Transform of an Array](https://leetcode.com/problems/rank-transform-of-an-array/)
* [1342. Number of Steps to Reduce a Number to Zero](https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/)
* [1356. Sort Integers by The Number of 1 Bits](https://leetcode.com/problems/sort-integers-by-the-number-of-1-bits/)
* [5143. Decompress Run-Length Encoded List](https://leetcode.com/problems/decompress-run-length-encoded-list/)

## Medium list:
* [2. Add Two Numbers](https://leetcode.com/problems/add-two-numbers/)
* [3. Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/)
* [11. Container With Most Water](https://leetcode.com/problems/container-with-most-water/)
* [19. Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/)
* [22. Generate Parentheses](https://leetcode.com/problems/generate-parentheses/)
* [24. Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/)
* [36. Valid Sudoku](https://leetcode.com/problems/valid-sudoku/)
* [46. Permutations](https://leetcode.com/problems/permutations/)
* [49. Group Anagrams](https://leetcode.com/problems/group-anagrams/)
* [50. Pow(x, n)](https://leetcode.com/problems/powx-n/)
* [56. Merge Intervals](https://leetcode.com/problems/merge-intervals/)
* [61. Rotate List](https://leetcode.com/problems/rotate-list/)
* [82. Remove Duplicates from Sorted List II](https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/)
* [94. Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/)
* [96. Unique Binary Search Trees](https://leetcode.com/problems/unique-binary-search-trees/)
* [98. Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/)
* [102. Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/)
* [105. Construct Binary Tree from Preorder and Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/)
* [106. Construct Binary Tree from Inorder and Postorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/)
* [129. Sum Root to Leaf Numbers](https://leetcode.com/problems/sum-root-to-leaf-numbers/)
* [138. Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/)
* [142. Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/)
* [144. Binary Tree Preorder Traversal](https://leetcode.com/problems/binary-tree-preorder-traversal/)
* [146. LRU Cache](https://leetcode.com/problems/lru-cache/)
* [150. Evaluate Reverse Polish Notation](https://leetcode.com/problems/evaluate-reverse-polish-notation/)
* [159. Longest Substring with At Most Two Distinct Characters](https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters/)
* [173. Binary Search Tree Iterator](https://leetcode.com/problems/binary-search-tree-iterator/)
* [200. Number of Islands](https://leetcode.com/problems/number-of-islands/)
* [279. Perfect Squares](https://leetcode.com/problems/perfect-squares/)
* [280. Wiggle Sort](https://leetcode.com/problems/wiggle-sort/)
* [286. Walls and Gates](https://leetcode.com/problems/walls-and-gates/)
* [230. Kth Smallest Element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/)
* [236. Lowest Common Ancestor of a Binary Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/)
* [238. Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/)
* [249. Group Shifted Strings](https://leetcode.com/problems/group-shifted-strings/)
* [250. Count Univalue Subtrees](https://leetcode.com/problems/count-univalue-subtrees/)
* [253. Meeting Rooms II](https://leetcode.com/problems/meeting-rooms-ii/)
* [288. Unique Word Abbreviation](https://leetcode.com/problems/unique-word-abbreviation/)
* [328. Odd Even Linked List](https://leetcode.com/problems/odd-even-linked-list/)
* [379. Design Phone Directory](https://leetcode.com/problems/design-phone-directory/)
* [380. Insert Delete GetRandom O(1)](https://leetcode.com/problems/insert-delete-getrandom-o1/)
* [394. Decode String](https://leetcode.com/problems/decode-string/)
* [430. Flatten a Multilevel Doubly Linked List](https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list/)
* [454. 4Sum II](https://leetcode.com/problems/4sum-ii/)
* [536. Construct Binary Tree from String](https://leetcode.com/problems/construct-binary-tree-from-string/)
* [622. Design Circular Queue](https://leetcode.com/problems/design-circular-queue/)
* [692. Top K Frequent Words](https://leetcode.com/problems/top-k-frequent-words/)
* [701. Insert into a Binary Search Tree](https://leetcode.com/problems/insert-into-a-binary-search-tree/)
* [707. Design Linked List](https://leetcode.com/problems/design-linked-list/)
* [708. Insert into a Sorted Circular Linked List](https://leetcode.com/problems/insert-into-a-sorted-circular-linked-list/)
* [731. My Calendar II](https://leetcode.com/problems/my-calendar-ii/)
* [739. Daily Temperatures](https://leetcode.com/problems/daily-temperatures/)
* [841. Keys and Rooms](https://leetcode.com/problems/keys-and-rooms/)
* [904. Fruit Into Baskets](https://leetcode.com/problems/fruit-into-baskets/)
* [939. Minimum Area Rectangle](https://leetcode.com/problems/minimum-area-rectangle/)
* [1007. Minimum Domino Rotations For Equal Row](https://leetcode.com/problems/minimum-domino-rotations-for-equal-row/)
* [1008. Construct Binary Search Tree from Preorder Traversal](https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal/)
* [1055. Shortest Way to Form String](https://leetcode.com/problems/shortest-way-to-form-string/)
* [1146. Snapshot Array](https://leetcode.com/problems/snapshot-array/)
* [1161. Maximum Level Sum of a Binary Tree](https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree/)
* [1249. Minimum Remove to Make Valid Parentheses](https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses/)
* [1302. Deepest Leaves Sum](https://leetcode.com/problems/deepest-leaves-sum/)
* [1305. All Elements in Two Binary Search Trees](https://leetcode.com/problems/all-elements-in-two-binary-search-trees/)
* [1306. Jump Game III](https://leetcode.com/problems/jump-game-iii/)
* [1310. XOR Queries of a Subarray](https://leetcode.com/problems/xor-queries-of-a-subarray/)
* [1324. Print Words Vertically](https://leetcode.com/problems/print-words-vertically/)
* [1325. Delete Leaves With a Given Value](https://leetcode.com/problems/delete-leaves-with-a-given-value/)
* [1328. Break a Palindrome](https://leetcode.com/problems/break-a-palindrome/)
* [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/)
* [1344. Angle Between Hands of a Clock](https://leetcode.com/problems/angle-between-hands-of-a-clock/)
* [1357. Apply Discount Every n Orders](https://leetcode.com/problems/apply-discount-every-n-orders/)
* [5145. Sum of Nodes with Even-Valued Grandparent](https://leetcode.com/problems/sum-of-nodes-with-even-valued-grandparent/)