Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/emanuelefavero/leetcode

This repository contains my solutions to LeetCode problems
https://github.com/emanuelefavero/leetcode

algorithms data-structures javascript leetcode leetcode-solutions

Last synced: 29 days ago
JSON representation

This repository contains my solutions to LeetCode problems

Awesome Lists containing this project

README

        

# LeetCode Solutions

This repository contains my solutions to LeetCode problems.

> Note: The solutions are written in JavaScript

## Usage

Feel free to browse the solutions and explanations for each problem. You can clone this repository to your local machine to access the code and run it as needed.

> Note: Contributions and feedback are welcome!

## Contents

### 2D Array

- [Print 2D Array](./2d-array/print-2d-array.js)
- [Print Multi Dimensional Array](./2d-array/print-multi-dimensional-array.js)
- [Diagonal Traverse](./2d-array/diagonal-traverse.js)
- [Spiral Matrix](./2d-array/spiral-matrix.js)
- [Pascal Triangle](./2d-array/pascal-triangle.js)
- [Matrix Diagonal Sum](./2d-array/matrix-diagonal-sum.js)
- [Design Neighbor Sum Service](./2d-array/design-neighbor-sum-service.js)
- [Largest Local Values in a Matrix](./2d-array/largest-local-values-in-a-matrix.js)

### Array

- [Running Sum Of 1d Array](./array/running-sum-of-1d-array.js)
- [Richest Customer Wealth](./array/richest-customer-wealth.js)
- [Max Consecutive Ones](./array/max-consecutive-ones.js)
- [Even Number Of Digits](./array/even-number-of-digits.js)
- [Squares Of A Sorted Array](./array/squares-of-a-sorted-array.js)
- [Duplicate Zeros](./array/duplicate-zeros.js)
- [Merge Sorted Array](./array/merge-sorted-array.js)
- [Delete Element By Index](./array/delete-element-by-index.js)
- [Remove Element](./array/remove-element.js)
- [Remove Duplicates From Sorted Array](./array/remove-duplicates-from-sorted-array.js)
- [Check If N And Its Double Exist](./array/check-if-n-and-its-double-exist.js)
- [Valid Mountain Array](./array/valid-mountain-array.js)
- [Replace Elements With Greatest Element On Right Side](./array/replace-elements-with-greatest.js)
- [Two Pointer Technique](./array/two-pointer-technique.js)
- [Move Zeroes](./array/move-zeroes.js)
- [Sort Array By Parity](./array/sort-array-by-parity.js)
- [Height Checker](./array/height-checker.js)
- [Third Maximum Number](./array/third-maximum-number.js)
- [Find All Numbers Disappeared In An Array](./array/find-disappeared-numbers.js)
- [Find Pivot Index](./array/find-pivot-index.js)
- [Largest Number At Least Twice Of Others](./array/largest-number-twice-of-others.js)
- [Plus One](./array/plus-one.js)
- [Array Partition I](./array/array-partition-i.js)
- [Two Sum II - Input Array Is Sorted](./array/two-sum-ii.js)
- [Minimum Size Subarray Sum](./array/minimum-size-subarray-sum.js)
- [Rotate Array](./array/rotate-array.js)
- [Pascal Triangle II](./array/pascal-triangle-ii.js)
- [Sort an Array (Merge Sort)](./array/sort-an-array-merge-sort.js)
- [Duplicate Zeros](./array/duplicate-zeros.js)
- [Concatenation Of Array](./array/concatenation-of-array.js)
- [Build Array From Permutation](./array/build-array-from-permutation.js)
- [Shuffle the Array](./array/shuffle-the-array.js)
- [Number of Employees Who Met the Target](./array/number-of-employees-who-met-target.js)
- [Kids With the Greatest Number of Candies](./array/kids-with-candies.js)
- [Sum of Values at Indices With K Set Bits](./array/sum-indices-with-k-set-bits.js)
- [Decode XORed Array](./array/decode-xored-array.js)
- [Left and Right Sum Differences](./array/left-and-right-sum-differences.js)
- [Create Target Array in the Given Order](./array/create-target-array.js)
- [Minimum Operations to Exceed Threshold Value I](./array/minimum-operations-to-exceed-value.js)
- [Truncate Sentence](./array/truncate-sentence.js)
- [Shuffle String](./array/shuffle-string.js)
- [Difference Between Element Sum and Digit Sum of an Array](./array/difference-of-sum.js)
- [Find First Palindromic String in the Array](./array/first-palindrome.js)
- [Count Number of Pairs With Absolute Difference K](./array/count-k-difference.js)
- [Count the Number of Consistent Strings](./array/count-consistent-strings.js)
- [Find the Highest Altitude](./array/find-the-highest-altitude.js)
- [Sum of All Odd Length Subarrays](./array/sum-odd-length-subarrays.js)
- [Check if a String Is an Acronym of Words](./array/check-if-string-is-acronym-of-words.js)
- [Unique Morse Code Words](./array/unique-morse-code-words.js)
- [Find Common Elements Between Two Arrays](./array/find-common-elements.js)
- [Minimum Time Visiting All Points](./array/minimum-time-visiting-all-points.js)
- [Subarrays Distinct Element Sum of Squares I](./array/subarrays-distinct-sum-of-squares-i.js)
- [Flipping an Image](./array/flipping-an-image.js)
- [Find the Integer Added to Array I](./array/find-the-integer-added-to-array-i.js)
- [Count Good Triplets](./array/count-good-triplets.js)
- [Find Maximum Number of String Pairs](./array/find-maximum-number-of-string-pairs.js)
- [Count Tested Devices After Test Operations](./array/count-tested-devices.js)
- [Sum of Squares of Special Elements](./array/sum-of-squares.js)
- [Sort the People](./array/sort-the-people.js)
- [Destination City](./array/destination-city.js)
- [Count Equal and Divisible Pairs in an Array](./array/count-pairs.js)
- [Separate the Digits in an Array](./array/separate-the-digits-in-an-array.js)
- [Count Elements With Maximum Frequency](./array/count-elements-with-maximum-frequency.js)
- [Find the Difference of Two Arrays](./array/find-the-difference-of-two-arrays.js)
- [Number Of Rectangles That Can Form The Largest Square](./array/count-good-rectangles.js)
- [Sort Integers by The Number of 1 Bits](./array/sort-by-bits.js)
- [Number of Students Unable to Eat Lunch](./array/students-unable-to-eat-lunch.js)
- [Counting Words With a Given Prefix](./array/counting-words-with-a-given-prefix.js)
- [Cells with Odd Values in a Matrix](./array/cells-with-odd-values-in-a-matrix.js)
- [Sum of All Subset XOR Totals](./array/sum-of-all-subset-xor-totals.js)
- [Find the Number of Good Pairs I](./array/find-the-number-of-good-pairs-i.js)
- [Count Pairs That Form a Complete Day I](./array/count-pairs-that-form-a-complete-day-i.js)
- [Final Prices With a Special Discount in a Shop](./array/final-prices-with-a-special-discount.js)
- [Find Minimum Operations to Make All Elements Divisible by Three](./array/find-minimum-operations-divisible-by-three.js)
- [Decompress Run-Length Encoded List](./array/decompress-rle-list.js)
- [Minimum Average of Smallest and Largest Elements](./array/minimum-average-of-smallest-and-largest.js)
- [Filter Elements from Array](./array/filter-elements-from-array.js)
- [Array Reduce Transformation](./array/array-reduce-transformation.js)
- [Design an Ordered Stream](./array/design-an-ordered-stream.js)
- [Chunk Array](./array/chunk-array.js)
- [Find if Digit Game Can Be Won](./array/find-if-digit-game-can-be-won.js)
- [Number of Senior Citizens](./array/number-of-senior-citizens.js)
- [Final Array State After K Multiplication Operations I](./array/final-array-after-k-multiplication-i.js)
- [Minimum Element After Replacement With Digit Sum](./array/minimum-element-after-replacement.js)
- [Maximum Average Subarray I](./array/maximum-average-subarray-i.js)
- [Defuse the Bomb](./array/defuse-the-bomb.js)
- [Find Greatest Common Divisor of Array](./array/find-greatest-common-divisor.js)
- [Baseball Game](./array/baseball-game.js)

### Binary Search

- [Binary Search Template I](./binary-search/binary-search-template-i.js)
- [Binary Search Template II](./binary-search/binary-search-template-ii.js)
- [Binary Search Template II](./binary-search/binary-search-template-iii.js)
- [Recursive Binary Search](./binary-search/recursive-binary-search.js)
- [Search Insert Position](./binary-search/search-insert-position.js)
- [Binary Search](./binary-search/binary-search.js)
- [Sqrt(x)](./binary-search/sqrt-x.js)
- [Guess Number Higher Or Lower](./binary-search/guess-number-higher-or-lower.js)
- [Search in Rotated Sorted Array](./binary-search/search-in-rotated-sorted-array.js)
- [First Bad Version](./binary-search/first-bad-version.js)
- [Find Peak Element](./binary-search/find-peak-element.js)
- [Find Minimum In Rotated Sorted Array](./binary-search/find-minimum-in-rotated-sorted-array.js)
- [Find Minimum In Rotated Sorted Array II](./binary-search/find-minimum-in-rotated-sorted-array-ii.js)
- [Search For A Range](./binary-search/search-for-a-range.js)
- [Find K Closest Elements](./binary-search/find-k-closest-elements.js)
- [Pow(x, n)](./binary-search/pow-x-n.js)
- [Valid Perfect Square](./binary-search/valid-perfect-square.js)
- [Find Smallest Letter Greater Than Target](./binary-search/find-smallest-letter-greater-than-target.js)
- [Count Negative Numbers in a Sorted Matrix](./binary-search/count-negatives.js)
- [Find Target Indices After Sorting Array](./binary-search/find-target-indices-after-sorting-array.js)
- [Longest Subsequence With Limited Sum](./binary-search/longest-subsequence-with-limited-sum.js)
- [Maximum Count of Positive Integer and Negative Integer](./binary-search/maximum-count.js)
- [Find the Distance Value Between Two Arrays](./binary-search/find-the-distance-value.js)
- [Missing Number](./binary-search/missing-number.js)
- [Count Complete Tree Nodes](./binary-search/count-complete-tree-nodes.js)

### Bit Manipulation

- [XOR Operation In An Array](./bit-manipulation/xor-operation-in-an-array.js)
- [Number of 1 Bits](./bit-manipulation/number-of-1-bits.js)
- [Hamming Distance](./bit-manipulation/hamming-distance.js)
- [Reverse Bits](./bit-manipulation/reverse-bits.js)
- [Minimum Bit Flips to Convert Number](./bit-manipulation/minimum-bit-flips-to-convert-number.js)

### Breadth First Search

- [Average of Levels in Binary Tree](./breadth-first-search/average-of-levels-in-binary-tree.js)
- [Univalued Binary Tree](./breadth-first-search/univalued-binary-tree.js)

### Database

- [Recyclable And Low Fat Products](./database/recyclable-and-low-fat-products.js)
- [Find Total Time Spent By Each Employee](./database/find-total-time-spent.js)
- [Daily Leads And Partners](./database/daily-leads-and-partners.js)
- [Number of Unique Subjects Taught by Each Teacher](./database/number-of-unique-subjects.js)
- [Rearrange Products Table](./database/rearrange-products-table.js)
- [Invalid Tweets](./database/invalid-tweets.js)
- [Bank Account Summary II](./database/bank-account-summary-ii.js)
- [Swap Salary](./database/swap-salary.js)
- [Replace Employee ID With The Unique Identifier](./database/replace-employee-id-with-unique-id.js)
- [Product Sales Analysis I](./database/product-sales-analysis-i.js)
- [Reformat Department Table](./database/reformat-department-table.js)

### Depth First Search

- [Range Sum of BST](./depth-first-search/range-sum-of-bst.js)
- [Find a Corresponding Node of a Binary Tree in a Clone of That Tree](./depth-first-search/find-node-in-cloned-binary-tree.js)
- [Merge Two Binary Trees](./depth-first-search/merge-two-binary-trees.js)
- [Increasing Order Search Tree](./depth-first-search/increasing-order-search-tree.js)
- [Sum of Root To Leaf Binary Numbers](./depth-first-search/sum-of-root-to-leaf-binary-numbers.js)

### Dynamic Programming

- [Fibonacci Number](./dynamic-programming/fibonacci-number.js)
- [Counting Bits](./dynamic-programming/counting-bits.js)
- [Divisor Game](./dynamic-programming/divisor-game.js)
- [Min Cost Climbing Stairs](./dynamic-programming/min-cost-climbing-stairs.js)
- [N-th Tribonacci Number](./dynamic-programming/n-th-tribonacci-number.js)
- [Is Subsequence](./dynamic-programming/is-subsequence.js)
- [Maximum Subarray](./dynamic-programming/maximum-subarray.js)
- [House Robber](./dynamic-programming/house-robber.js)

### Easy

- [Add Two Integers](./easy/add-two-integers.js)
- [Fizz Buzz](./easy/fizz-buzz.js)
- [Two Sum](./easy/two-sum.js)
- [Best Time To Buy And Sell Stock](./easy/best-time-to-buy-and-sell-stock.js)
- [Majority Element](./easy/majority-element.js)
- [Return Length of Arguments Passed](./easy/return-length-of-arguments-passed.js)
- [Add Two Promises](./easy/add-two-promises.js)
- [Timeout Cancellation](./easy/timeout-cancellation.js)
- [Design Parking System](./easy/design-parking-system.js)
- [Array Wrapper](./easy/array-wrapper.js)
- [Sleep](./easy/sleep.js)
- [Function Composition](./easy/function-composition.js)
- [Allow One Function Call](./easy/allow-one-function-call.js)
- [Apply Transform Over Each Element In Array](./easy/apply-transform-over-each-element.js)
- [Generate Fibonacci Sequence](./easy/generate-fibonacci-sequence.js)
- [Sort By](./easy/sort-by.js)
- [Create Hello World Function](./easy/create-hello-word-function.js)
- [Interval Cancellation](./easy/interval-cancellation.js)
- [Counter](./easy/counter.js)
- [To Be Or Not To Be](./easy/to-be-or-not-to-be.js)
- [Counter II](./easy/counter-ii.js)
- [Is Object Empty](./easy/is-object-empty.js)
- [Array Prototype Last](./easy/array-prototype-last.js)
- [Calculator with Method Chaining](./easy/calculator-with-method-chaining.js)

### Graph

- [Disjoint Set](./graph/disjoint-set.js)
- [Disjoint Set Efficient](./graph/disjoint-set-efficient.js)
- [Number Of Provinces](./graph/number-of-provinces.js)
- [Smallest String With Swaps](./graph/smallest-string-with-swaps.js)
- [Find Center of Star Graph](./graph/find-center-of-star-graph.js)

### Greedy

- [Maximum Odd Binary Number](./greedy/maximum-odd-binary-number.js)
- [Maximum 69 Number](./greedy/maximum-69-number.js)
- [Maximum Sum With Exactly K Elements](./greedy/maximize-sum.js)
- [Lexicographically Smallest Palindrome](./greedy/lexicographically-smallest-palindrome.js)
- [Minimum Operations to Make the Array Increasing](./greedy/min-operations.js)
- [DI String Match](./greedy/di-string-match.js)
- [Minimum Time to Type Word Using Special Typewriter](./greedy/min-time-to-type.js)
- [Best Time to Buy and Sell Stock II](./greedy/best-time-to-buy-and-sell-stock-ii.js)
- [Can Place Flowers](./greedy/can-place-flowers.js)

### Hash Table

- [Two Sum](./hash-table/two-sum.js)
- [Ransom Note](./hash-table/ransom-note.js)
- [Design Hash Set](./hash-table/design-hash-set.js)
- [Design Hash Map](./hash-table/design-hash-map.js)
- [Find Duplicates By Hash Set](./hash-table/find-duplicates-by-hash-set.js)
- [Contains Duplicate](./hash-table/contains-duplicate.js)
- [Single Number](./hash-table/single-number.js)
- [Intersection Of Two Arrays](./hash-table/intersection-of-two-arrays.js)
- [Happy Number](./hash-table/happy-number.js)
- [Isomorphic Strings](./hash-table/isomorphic-strings.js)
- [Minimum Index Sum Of Two Lists](./hash-table/minimum-index-sum-of-two-lists.js)
- [First Unique Character In A String](./hash-table/first-unique-character-in-a-string.js)
- [Intersection Of Two Arrays II](./hash-table/intersection-of-two-arrays-ii.js)
- [Contains Duplicate II](./hash-table/contains-duplicate-ii.js)
- [Group Anagrams](./hash-table/group-anagrams.js)
- [Valid Sudoku](./hash-table/valid-sudoku.js)
- [Find Duplicate Subtrees](./hash-table/find-duplicate-subtrees.js)
- [Jewels And Stones](./hash-table/jewels-and-stones.js)
- [Longest Substring Without Repeating Characters](./hash-table/longest-without-repeating-chars.js)
- [4Sum II](./hash-table/4sum-ii.js)
- [Top K Frequent Elements](./hash-table/top-k-frequent-elements.js)
- [Insert Delete GetRandom O(1)](./hash-table/insert-delete-get-random.js)
- [Number of Good Pairs](./hash-table/number-of-good-pairs.js)
- [How Many Numbers Are Smaller Than the Current Number](./hash-table/smaller-numbers-than-current.js)
- [Decode the Message](./hash-table/decode-the-message.js)
- [Number of Arithmetic Triplets](./hash-table/number-of-arithmetic-triplets.js)
- [Check if the Sentence Is Pangram](./hash-table/check-if-the-sentence-is-pangram.js)
- [Kth Distinct String in an Array](./hash-table/kth-distinct-string-in-an-array.js)
- [Find the XOR of Numbers Which Appear Twice](./hash-table/find-xor-of-twice-numbers.js)
- [Rings and Rods](./hash-table/rings-and-rods.js)
- [Sort Array by Increasing Frequency](./hash-table/sort-array-by-increasing-freq.js)
- [Sum of Unique Elements](./hash-table/sum-of-unique-elements.js)
- [Check if All Characters Have Equal Number of Occurrences](./hash-table/are-occurrences-equal.js)
- [Unique Number of Occurrences](./hash-table/unique-number-of-occurrences.js)

### Heap

- [Implement Min Heap](./heap/implement-min-heap.js)
- [Implement Max Heap](./heap/implement-max-heap.js)

### Linked List

- [Design Linked List](./linked-list/design-linked-list.js)
- [Design Doubly Linked List](./linked-list/design-doubly-linked-list.js)
- [Middle Of Linked List](./linked-list/middle-of-linked-list.js)
- [Linked List Cycle](./linked-list/linked-list-cycle.js)
- [Linked List Cycle II](./linked-list/linked-list-cycle-ii.js)
- [Intersection Of Two Linked Lists](./linked-list/intersection-of-two-linked-lists.js)
- [Remove Nth Node From End Of List](./linked-list/remove-nth-node-from-end.js)
- [Reverse Linked List](./linked-list/reverse-linked-list.js)
- [Remove Linked List Elements](./linked-list/remove-linked-list-elements.js)
- [Odd Even Linked List](./linked-list/odd-even-linked-list.js)
- [Palindrome Linked List](./linked-list/palindrome-linked-list.js)
- [Merge Two Sorted Lists](./linked-list/merge-two-sorted-lists.js)
- [Add Two Numbers](./linked-list/add-two-numbers.js)
- [Print Multilevel Linked List](./linked-list/print-multilevel-linked-list.js)
- [Flatten Multilevel Linked List](./linked-list/flatten-multilevel-linked-list.js)
- [Copy List With Random Pointer](./linked-list/copy-list-with-random-pointer.js)
- [Rotate List](./linked-list/rotate-list.js)
- [Remove Duplicates from Sorted List](./linked-list/remove-duplicates-from-sorted-list.js)
- [Delete Node in a Linked List](./linked-list/delete-node-in-a-linked-list.js)
- [Convert Binary Number in a Linked List to Integer](./linked-list/convert-linked-list-binary-to-int.js)

### Math

- [Number Of Steps To Reduce A Number To Zero](./math/number-of-steps-to-reduce-a-number-to-zero.js)
- [Find the Maximum Achievable Number](./math/find-maximum-achievable-number.js)
- [Convert The Temperature](./math/convert-the-temperature.js)
- [Divisible and Non-divisible Sums Difference](./math/difference-of-sums.js)
- [Smallest Even Multiple](./math/smallest-even-multiple.js)
- [Subtract the Product and Sum of Digits of an Integer](./math/subtract-product-and-sum.js)
- [Minimum Sum of Four Digit Number After Splitting Digits](./math/minimum-sum.js)
- [Count Primes](./math/count-primes.js)
- [Power of Three](./math/power-of-three.js)
- [Roman to Integer](./math/roman-to-integer.js)
- [Count of Matches in Tournament](./math/count-of-matches-in-tournament.js)
- [Sum Multiples](./math/sum-multiples.js)
- [Shuffle an Array](./math/shuffle-an-array.js)
- [Count the Digits That Divide a Number](./math/count-the-digits-that-divide-a-number.js)
- [Find the Pivot Integer](./math/find-the-pivot-integer.js)
- [Harshad Number](./math/harshad-number.js)
- [A Number After a Double Reversal](./math/a-number-after-a-double-reversal.js)
- [Number of Common Factors](./math/number-of-common-factors.js)
- [Self Dividing Numbers](./math/self-dividing-numbers.js)
- [Determine Color of a Chessboard Square](./math/determine-color-of-chessboard-square.js)
- [Calculate Money in Leetcode Bank](./math/calculate-money-in-leetcode-bank.js)

### Matrix

- [Flood Fill](./matrix/flood-fill.js)
- [01 Matrix](./matrix/01-matrix.js)
- [Rotate Image](./matrix/rotate-image.js)
- [Magic Squares In Grid](./matrix/magic-squares-in-grid.js)
- [Regions Cut By Slashes](./matrix/regions-cut-by-slashes.js)
- [Snake in Matrix](./matrix/snake-in-matrix.js)
- [Lucky Numbers in a Matrix](./matrix/lucky-numbers-in-a-matrix.js)
- [Delete Greatest Value in Each Row](./matrix/delete-greatest-value-in-each-row.js)

### Medium

- [Memoize](./medium/memoize.js)
- [Join Two Arrays by ID](./medium/join-two-arrays-by-id.js)
- [Execute Asynchronous Functions in Parallel](./medium/execute-async-functions-in-parallel.js)

### Queue

- [Design Circular Queue](./queue/design-circular-queue.js)
- [Number of Islands](./queue/number-of-islands.js)
- [Open The Lock](./queue/open-the-lock.js)
- [Perfect Squares](./queue/perfect-squares.js)
- [Queue Technique Template](./queue/queue-technique-template.js)
- [Implement Queue Using Stacks](./queue/implement-queue-using-stacks.js)

### Recursion

- [Fibonacci Number](./recursion/fibonacci-number.js)
- [Print Reverse](./recursion/print-reverse.js)
- [Reverse String](./recursion/reverse-string.js)
- [Swap Nodes In Pairs](./recursion/swap-nodes-in-pairs.js)
- [Reverse Linked List](./recursion/reverse-linked-list.js)
- [Search In A Binary Search Tree](./recursion/search-in-a-binary-search-tree.js)
- [Pascal Triangle II](./recursion/pascal-triangle-ii.js)
- [Climbing Stairs](./recursion/climbing-stairs.js)
- [Maximum Depth Of Binary Tree](./recursion/maximum-depth-of-binary-tree.js)
- [Merge Two Sorted Lists](./recursion/merge-two-sorted-lists.js)
- [K-th Symbol In Grammar](./recursion/k-th-symbol-in-grammar.js)
- [Unique Binary Search Trees II](./recursion/unique-binary-search-trees-ii.js)
- [Search a 2D Matrix II](./recursion/search-a-2d-matrix-ii.js)
- [N Queens II](./recursion/n-queens-ii.js)
- [Sudoku Solver](./recursion/sudoku-solver.js)
- [Combinations](./recursion/combinations.js)
- [Same Tree](./recursion/same-tree.js)
- [Generate Parentheses](./recursion/generate-parentheses.js)
- [Largest Rectangle In Histogram](./recursion/largest-rectangle-in-histogram.js)
- [Permutations](./recursion/permutations.js)
- [Letter Combinations of a Phone Number](./recursion/letter-combinations-phone-number.js)
- [The Skyline Problem](./recursion/the-skyline-problem.js)

### Sorting

- [Widest Vertical Area Between Two Points Containing No Points](./sorting/max-width-of-vertical-area.js)
- [Count Pairs Whose Sum is Less than Target](./sorting/count-pairs.js)
- [Minimum Number Game](./sorting/minimum-number-game.js)
- [Sorting the Sentence](./sorting/sorting-the-sentence.js)
- [Maximum Product Difference Between Two Pairs](./sorting/max-product-difference.js)
- [Maximum Product of Two Elements in an Array](./sorting/max-product-of-two-elements.js)
- [Minimum Number of Moves to Seat Everyone](./sorting/min-moves-to-seat.js)

### Stack

- [Design Stack](./stack/design-stack.js)
- [Min Stack](./stack/min-stack.js)
- [Valid Parentheses](./stack/valid-parentheses.js)
- [Daily Temperatures](./stack/daily-temperatures.js)
- [Evaluate Reverse Polish Notation](./stack/evaluate-reverse-polish-notation.js)
- [Clone Graph](./stack/clone-graph.js)
- [Depth First Search Template II](./stack/depth-first-search-template-ii.js)
- [Target Sum](./stack/target-sum.js)
- [Implement Stack Using Queues](./stack/implement-stack-using-queues.js)
- [Decode String](./stack/decode-string.js)
- [Flood Fill](./stack/flood-fill.js)
- [Keys And Rooms](./stack/keys-and-rooms.js)

### String

- [Add Binary](./string/add-binary.js)
- [Implement StrStr](./string/implement-strstr.js)
- [Longest Common Prefix](./string/longest-common-prefix.js)
- [Reverse String](./string/reverse-string.js)
- [Reverse Words In A String](./string/reverse-words-in-a-string.js)
- [Reverse Words In A String III](./string/reverse-words-in-a-string-iii.js)
- [Defanging An IP Address](./string/defanging-an-ip-address.js)
- [Final Value Of Variable After Performing Operations](./string/final-value-after-operations.js)
- [Goal Parser Interpretation](./string/goal-parser-interpretation.js)
- [Maximum Number of Words Found in Sentences](./string/maximum-words-found.js)
- [Find Words Containing Character](./string/find-words-containing-character.js)
- [Split A String In Balanced Strings](./string/split-a-string-in-balanced-strings.js)
- [Check If Two String Arrays Are Equivalent](./string/array-strings-are-equal.js)
- [Count Items Matching A Rule](./string/count-items-matching-a-rule.js)
- [Length of Last Word](./string/length-of-last-word.js)
- [Score of a String](./string/score-of-a-string.js)
- [Valid Palindrome](./string/valid-palindrome.js)
- [Permutation Difference between Two Strings](./string/permutation-difference.js)
- [Reverse Prefix of Word](./string/reverse-prefix-of-word.js)
- [Reverse Integer](./string/reverse-integer.js)
- [Valid Anagram](./string/valid-anagram.js)
- [String to Integer (atoi)](./string/string-to-integer.js)
- [Merge Strings Alternately](./string/merge-strings-alternately.js)
- [Greatest Common Divisor of Strings](./string/greatest-common-divisor.js)
- [Reverse Vowels of a String](./string/reverse-vowels-of-a-string.js)
- [Decode the Message](./string/decode-the-message.js)
- [Cells in a Range on an Excel Sheet](./string/cells-in-range-on-an-excel-sheet.js)
- [Faulty Keyboard](./string/faulty-keyboard.js)
- [Maximum Nesting Depth of the Parentheses](./string/max-depth-of-parentheses.js)
- [Remove Outermost Parentheses](./string/remove-outermost-parentheses.js)
- [To Lower Case](./string/to-lower-case.js)
- [Count Asterisks](./string/count-asterisks.js)
- [Replace All Digits with Characters](./string/replace-all-digits-with-characters.js)
- [Number of Strings That Appear as Substrings in Word](./string/number-of-strings-as-substrings.js)
- [Number of Changing Keys](./string/number-of-changing-keys.js)
- [Minimum Number of Chairs in a Waiting Room](./string/minimum-number-of-chairs.js)
- [Count Substrings That Satisfy K-Constraint I](./string/count-k-constraint-substrings-i.js)
- [Check Balanced String](./string/check-balanced-string.js)
- [Decrypt String from Alphabet to Integer Mapping](./string/decrypt-string-alphabet-to-integer.js)
- [Remove Trailing Zeros From a String](./string/remove-trailing-zeros-from-a-string.js)
- [Determine if String Halves Are Alike](./string/determine-if-halves-are-alike.js)
- [Generate a String With Characters That Have Odd Counts](./string/generate-odd-counts-string.js)

### Tree

- [Invert Binary Tree](./tree/invert-binary-tree.js)
- [Binary Tree Inorder Traversal](./tree/binary-tree-inorder-traversal.js)
- [Binary Tree Preorder Traversal](./tree/binary-tree-preorder-traversal.js)
- [Binary Tree Postorder Traversal](./tree/binary-tree-postorder-traversal.js)
- [Binary Tree Level Order Traversal](./tree/binary-tree-level-order-traversal.js)
- [N-ary Tree Preorder Traversal](./tree/n-ary-tree-preorder-traversal.js)
- [N-ary Tree Postorder Traversal](./tree/n-ary-tree-postorder-traversal.js)
- [N-ary Tree Level Order Traversal](./tree/n-ary-tree-level-order-traversal.js)
- [Search In A Binary Search Tree](./tree/search-in-a-binary-search-tree.js)
- [Insert Into A Binary Search Tree](./tree/insert-into-a-binary-search-tree.js)
- [Delete Node In A Binary Search Tree](./tree/delete-node-in-a-bst.js)
- [Root Equal Sum Of Children](./tree/root-equal-sum-of-children.js)
- [Maximum Depth Of Binary Tree](./tree/maximum-depth-of-binary-tree.js)
- [Symmetric Tree](./tree/symmetric-tree.js)
- [Path Sum](./tree/path-sum.js)
- [Construct Binary Tree From Inorder And Postorder Traversal](./tree/construct-binary-tree-from-inorder-postorder.js)
- [Construct Binary Tree From Preorder And Inorder Traversal](./tree/construct-binary-tree-from-preorder-inorder.js)
- [Populating Next Right Pointers in Each Node](./tree/populating-next-right-pointers.js)
- [Populating Next Right Pointers in Each Node II](./tree/populating-next-right-pointers-ii.js)
- [Lowest Common Ancestor of a Binary Tree](./tree/lowest-common-ancestor.js)
- [Serialize And Deserialize Binary Tree](./tree/serialize-and-deserialize.js)
- [Maximum Depth Of N-ary Tree](./tree/maximum-depth-of-n-ary-tree.js)
- [Validate Binary Search Tree](./tree/validate-binary-search-tree.js)
- [Binary Search Tree Iterator](./tree/binary-search-tree-iterator.js)
- [Kth Largest Element In A Stream](./tree/kth-largest-element-in-a-stream.js)
- [Lowest Common Ancestor of a Binary Search Tree](./tree/lowest-common-ancestor-of-a-bst.js)
- [Contains Duplicate III](./tree/contains-duplicate-iii.js)
- [Balanced Binary Tree](./tree/balanced-binary-tree.js)
- [Convert Sorted Array To Binary Search Tree](./tree/convert-sorted-array-to-bst.js)
- [Diameter Of Binary Tree](./tree/diameter-of-binary-tree.js)
- [Minimum Depth of Binary Tree](./tree/minimum-depth-of-binary-tree.js)
- [Evaluate Boolean Binary Tree](./tree/evaluate-boolean-binary-tree.js)

### Trie

- [Implement Trie](./trie/implement-trie.js)
- [Map Sum Pairs](./trie/map-sum-pairs.js)
- [Replace Words](./trie/replace-words.js)
- [Add and Search Word - Data structure design](./trie/add-and-search-word.js)
- [Palindrome Pairs](./trie/palindrome-pairs.js)

## License

- [MIT](LICENSE.md)