Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sudheerj/datastructures-algorithms
List of Programs related to data structures and algorithms
https://github.com/sudheerj/datastructures-algorithms
algorithm-challenges algorithms datastructures datastructures-algorithms dsa dsa-algorithm dynamic-programming graph interview java javascript leetcode linkedlist lodash polyfills prototype queue stack tree
Last synced: 9 days ago
JSON representation
List of Programs related to data structures and algorithms
- Host: GitHub
- URL: https://github.com/sudheerj/datastructures-algorithms
- Owner: sudheerj
- Created: 2018-12-07T10:56:26.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-22T08:26:20.000Z (14 days ago)
- Last Synced: 2024-10-23T08:11:42.907Z (13 days ago)
- Topics: algorithm-challenges, algorithms, datastructures, datastructures-algorithms, dsa, dsa-algorithm, dynamic-programming, graph, interview, java, javascript, leetcode, linkedlist, lodash, polyfills, prototype, queue, stack, tree
- Language: Java
- Homepage:
- Size: 1.41 MB
- Stars: 427
- Watchers: 8
- Forks: 120
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# datastructures-algorithms
List of Programs related to data structures and algorithms## Data Structures
### Stack
| No. | Name | Source | Live | Documentation | Level | Pattern |
| :-: | :---------------- | :---------------------------------------------------------------------------------------------------------------------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------: | :---: | :--------------------: |
| 1 | Stack using array | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/stack/1.stack_with_array/stack_with_array.js) | [JavaScript](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/stack/1.stack_with_array//stack_with_array.js) | - | Easy | Using Array operations |
| 2 | Stack using linkedlist | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/stack/2.stack_with_linkedlist/stack_with_linkedlist.js) | [JavaScript](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/stack/2.stack_with_linkedlist/stack_with_linkedlist.js) | - | Easy | Using LinkedList operations |### Queue
1. Queue using array: [JavaScript](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/queue/queue_array.js)
2. Queue using linkedlist: [JavaScript](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/queue/queue_with_linkedlist.js)### SinglyLinkedlist
1. SinglyLinkedlist implementation: [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/singlyLinkedList/singlyLinkedList.js) [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/singlyLinkedList/singlyLinkedList.js) [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/singlyLinkedList/singlyLinkedList.md)
### DoublyLinkedlist1. DoublyLinkedlist implementation: [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/doublyLinkedlist/doublyLinkedlist.js) [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/doublyLinkedlist/doublyLinkedlist.js) [Documentation](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/doublyLinkedlist/doublyLinkedlist.md)
### Tree
1. Binary Search Tree: [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/trees/binary_search_tree.js) [JavaScript](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/trees/binary_search_tree.js) [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/trees/binary_search_tree.js)### Graphs
1. Unweighted undirected graph: [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/graphs/unweightedUndirected/unweighted_undirected.js) [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/graphs/unweightedUndirected/unweighted_undirected.js) [Documentation](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/graphs/unweightedUndirected/unweighted_undirected.md)
### HashTable
1. HashTable: [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/datastructures/hashtable/hashtable.js)
## Algorithms
### Array
| No. | Name | Source | Live | Documentation | Level | Pattern |
| :-: | :------------------------------------ | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----: | :--------------------------: |
| 1 | Contains duplicates | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/1.containsDuplicate/containsDuplicate.js) | [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/1.containsDuplicate/containsDuplicate.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/1.containsDuplicate/containsDuplicate.md) | Easy | Set/Object |
| 2 | Two sum2- Input array sorted | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/2.twoSum2/twoSum2.js) | [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/2.twoSum2/twoSum2.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/2.twoSum2/twoSum2.md) | Medium | Two pointers |
| 3 | 3 sum | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/3.threesum/threeSum.js) | [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/3.threesum/threeSum.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/3.threesum/threeSum.md) | Medium | Two pointers |
| 4 | Product of array except self | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/4.productExceptSelf/productExceptSelf.js) | [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/4.productExceptSelf/productExceptSelf.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/4.productExceptSelf/productExceptSelf.md) | Medium | Prefix and postfix pattern |
| 5 | Max sum subarray | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/5.maxSumSubarray/maxSumSubarray.js) | [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/5.maxSumSubarray/maxSumSubarray.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/5.maxSumSubarray/maxSumSubarray.md) | Medium | Kadane's algorithm |
| 6 | Minimum size subarray sum | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/6.minimumSizeSubarraySum/minSizeSubarraySum.js) | [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/6.minimumSizeSubarraySum/minSizeSubarraySum.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/6.minimumSizeSubarraySum/minSizeSubarraySum.md) | Medium | Sliding window |
| 7 | Sort Colors | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/7.sortColors/sortColors.js) | [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/7.sortColors/sortColors.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/7.sortColors/sortColors.md) | Medium | Two pointers |
| 8 | Maximum product subarray | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/8.maxProductSubarray/maxProductSubarray.js) | [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/8.maxProductSubarray/maxProductSubarray.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/8.maxProductSubarray/maxProductSubarray.md) | Medium | Kadane's algorithm |
| 9 | Find minimum in rotated sorted array | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/9.minRotatedSortedarray/minRotatedSortedarray.js) | [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/9.minRotatedSortedarray/minRotatedSortedarray.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/9.minRotatedSortedarray/minRotatedSortedarray.md) | Medium | Binary search technique |
| 10 | Maximum Circular subarray | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/10.maxSumCircularSubArray/maxSumCircularSubArray.js) | [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/10.maxSumCircularSubArray/maxSumCircularSubArray.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/10.maxSumCircularSubArray/maxSumCircularSubArray.md) | Medium | Kadane's algorithm |
| 11 | Rotate array | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/11.rotateArray/rotateArray.js) | [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/11.rotateArray/rotateArray.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/11.rotateArray/rotateArray.md) | Medium | Two pointers |
| 12 | Search in rotated sorted array | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/12.searchRotatedSortedArray/searchRotatedSortedArray.js) | [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/12.searchRotatedSortedArray/searchRotatedSortedArray.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/11.searchRotatedSortedArray/searchRotatedSortedArray.md) | Medium | Binary search |
| 13 | Container with most water | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/13.containerWithMostWater/containerWithMostWater.js) | [Playground](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/13.containerWithMostWater/containerWithMostWater.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/13.containerWithMostWater/containerWithMostWater.md) | Medium | Two pointers |
| 14 | First missing positive number | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/14.firstMissingPositive/firstMissingPositive.js) | [JavaScript](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/14.firstMissingPositive/firstMissingPositive.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/14.firstMissingPositive/firstMissingPositive.md) | Hard | In-place hashing |
| 15 | Best time to buy stock and sell stock | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/15.buySellStock/buySellStock.js) | [JavaScript](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/15.buySellStock/buySellStock.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/15.buySellStock/buySellStock.md) | Easy | Greedy algorithm |
| 16 | Two missing numbers | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/16.twoMissingNumbers/twoMissingNumbers.js) | [JavaScript](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/16.twoMissingNumbers/twoMissingNumbers.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/array/16.twoMissingNumbers/twoMissingNumbers.md) | Medium | Sum and average calculations |### String
| No. | Name | Source | Live | Documentation | Level | Pattern |
| :-: | :--------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----: | :-------------------------------: |
| 1 | Longest substring without repeating characters | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/1.longestSubstringWithoutRepeatingChars/longestSubstringWithoutRepeatingChars.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/1.longestSubstringWithoutRepeatingChars/longestSubstringWithoutRepeatingChars.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/1.longestSubstringWithoutRepeatingChars/longestSubstringWithoutRepeatingChars.md) | Medium | Sliding Window |
| 2 | Longest repeating character replacement | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/2.longestRepeatingCharReplacement/longestRepeatingCharReplacement.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/2.longestRepeatingCharReplacement/longestRepeatingCharReplacement.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/2.longestRepeatingCharReplacement/longestRepeatingCharReplacement.md) | Medium | Sliding Window |
| 3 | Minimum window substring | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/3.minWindowSubstring/minWindowSubstring.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/3.minWindowSubstring/minWindowSubstring.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/3.minWindowSubstring/minWindowSubstring.md) | Hard | Sliding Window |
| 4 | Valid anagram | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/4.validAnagram/validAnagram.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/4.validAnagram/validAnagram.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/4.validAnagram/validAnagram.md) | Easy | Frequency counting |
| 5 | Group anagrams | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/5.groupAnagrams/groupAnagrams.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/5.groupAnagrams/groupAnagrams.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/5.groupAnagrams/groupAnagrams.md) | Medium | Frequency counting |
| 6 | Valid palindrome | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/6.validPalindrome/validPalindrome.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/6.validPalindrome/validPalindrome.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/6.validPalindrome/validPalindrome.md) | Easy | Two pointer |
| 7 | Longest palindromic substring | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/7.longestPalindromicSubstring/longestPalindromicSubstring.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/7.longestPalindromicSubstring/longestPalindromicSubstring.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/7.longestPalindromicSubstring/longestPalindromicSubstring.md) | Medium | Expanding around center |
| 8 | Palindromic substrings | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/8.palindromicSubstrings/palindromicSubstrings.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/8.palindromicSubstrings/palindromicSubstrings.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/8.palindromicSubstrings/palindromicSubstrings.md) | Medium | Expanding around center |
| 9 | Encode and decode strings | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/9.encodeDecodeStrings/encodeDecodeStrings.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/9.encodeDecodeStrings/encodeDecodeStrings.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/9.encodeDecodeStrings/encodeDecodeStrings.md) | Medium | Basic string and array operations |
| 10 | Greatest common devisor of strings | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/10.greatestCommonDivisor/greatestCommonDivisor.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/10.greatestCommonDivisor/greatestCommonDivisor.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/10.greatestCommonDivisor/greatestCommonDivisor.md) | Easy | Euclidean and String operations |
| 11 | Reverse words in string | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/11.reverseWordsInString/reverseWordsInString.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/11.reverseWordsInString/reverseWordsInString.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/strings/11.reverseWordsInString/reverseWordsInString.md) | Medium | Basic string and array operations |### Dynamic programming
| No. | Name | Source | Live | Documentation | Level | Pattern |
| :-: | :----------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----: | :---------------------------------------------: |
| 1 | Climbing stairs | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/1.climbingStairs/climbingStairs.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/1.climbingStairs/climbingStairs.js) | [Documentation](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/1.climbingStairs/climbingStairs.md) | Medium | Dynamic programming |
| 2 | Coin change | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/2.coinsChange/coinsChange.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/2.coinsChange/coinsChange.js) | [Documentation](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/2.coinsChange/coinsChange.md) | Medium | Dynamic programming |
| 3 | Longest increasing subsequence | [Source](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/3.longestIncreasingSequence/longestIncreasingSequence.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/3.longestIncreasingSequence/longestIncreasingSequence.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/3.longestIncreasingSequence/longestIncreasingSequence.md) | Medium | Dynamic programming(Bottom up) |
| 4 | Longest common subsequence | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/4.longestCommonSubsequence/longestCommonSubsequence.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/4.longestCommonSubsequence/longestCommonSubsequence.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/4.longestCommonSubsequence/longestCommonSubsequence.md) | Medium | Two-dimentional bottom up Dynamic programming |
| 5 | Word break | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/5.wordBreak/wordBreak.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/5.wordBreak/wordBreak.js) | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/5.wordBreak/wordBreak.md) | Medium | Bottom up dynamic programming |
| 6 | Combination Sum 4 | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/6.combinationSum4/combinationSum4.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/6.combinationSum4/combinationSum4.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/6.combinationSum4/combinationSum4.md) | Medium | Bottom up Dynamic programming |
| 7 | House robber | [Source](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/7.houseRobber/houseRobber.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/7.houseRobber/houseRobber.js) | [Documentation](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/7.houseRobber/houseRobber.md) | Medium | Fibonacci pattern bottom-up dynamic programming |
| 8 | House robber 2 | [Source](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/8.houseRobber2/houseRobber2.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/8.houseRobber2/houseRobber2.js) | [Documentation](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/8.houseRobber2/houseRobber2.md) | Medium | Bottom-up dynamic programming |
| 9 | Decode ways | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/9.numDecodingWaysnumDecodingWays.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/9.numDecodingWaysnumDecodingWays.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/9.numDecodingWaysnumDecodingWays.md) | Medium | Dynamic programming |
| 10 | Unique paths | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/9.uniquePaths/uniquePaths.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/9.uniquePaths/uniquePaths.js) | [Documentation](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/9.uniquePaths/uniquePaths.md) | Medium | Dynamic programming |
| 11 | Jump game | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/11.jumpGame/jumpGame.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/11.jumpGame/jumpGame.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/dynamicProgramming/11.jumpGame/jumpGame.md) | Medium | Dynamic programming or Greedy |### Binary
| No. | Name | Source | Playground | Documentation | Level | Pattern |
| :-: | :------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------: | :----: | :-----------------: |
| 1 | Sum of two integers | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/1.twoSum/twoSum.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/1.twoSum/twoSum.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/1.twoSum/twoSum.md) | Medium | Bitwise operations |
| 2 | Number of 1 Bits | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/2.numberOf1Bits/numberOf1Bits.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/2.numberOf1Bits/numberOf1Bits.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/2.numberOf1Bits/numberOf1Bits.md) | Easy | Brian Kernighans |
| 3 | Counting Bits | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/3.countingBits/countingBits.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/3.countingBits/countingBits.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/3.countingBits/countingBits.md) | Easy | Dynamic programming |
| 4 | Missing number | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/4.missingNumber/missingNumber.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/4.missingNumber/missingNumber.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/4.missingNumber/missingNumber.js) | Easy | Bitwise XOR |
| 5 | Reverse Bits | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/5.reverseBits/reverseBits.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/5.reverseBits/reverseBits.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/binary/5.reverseBits/reverseBits.md) | Easy | Bitwise operations |### Stack
| No. | Name | Source | Playground | Documentation | Level | Pattern |
| :-: | :----------------- | :------------------------------------------------------------------------------------------------------------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------: | :----: | :------------------------: |
| 1 | Sort Stack | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/1.sortStack/sortStack.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/1.sortStack/sortStack.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/1.sortStack/sortStack.js) | Easy | Stack push & pop |
| 2 | Balanced Brackets | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/2.balancedBrackets/balancedBrackets.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/2.balancedBrackets/balancedBrackets.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/2.balancedBrackets/balancedBrackets.md) | Medium | Stack push and pop |
| 3 | Reverse Polish Notation | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/3.reversePolishNotation/reversePolishNotation.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/3.reversePolishNotation/reversePolishNotation.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/3.reversePolishNotation/reversePolishNotation.md) | Medium | Stack push & pop |
| 4 | Daily Temperatures | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/4.dailyTemperatures/dailyTemperatures.md) | [JavaScript](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/4.dailyTemperatures/dailyTemperatures.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/4.dailyTemperatures/dailyTemperatures.md) | Medium | Monotonic decreasing stack |
| 5 | Number of People See In Queue | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/5.numberOfPeopleSeeInQueue/numberOfPeopleSeeInQueue.js) | [JavaScript](https://livecodes.io/?console=open&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/5.numberOfPeopleSeeInQueue/numberOfPeopleSeeInQueue.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/stack/5.numberOfPeopleSeeInQueue/numberOfPeopleSeeInQueue.md) | Medium | Monotonic decreasing stack |### LinkedList
| No. | Name | Source | Playground | Documentation | Level | Pattern |
| :-: | :------------------------------- | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----: | :--------------------------------------------------: |
| 1 | Reverse sublist | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/1.reverseSublist/reverseSublist.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/1.reverseSublist/reverseSublist.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/1.reverseSublist/reverseSublist.js) | Easy | List traversal |
| 2 | Detect cycle in a linkedlist | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/2.detectLoop/detectLoop.js) | [Playground](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/2.detectLoop/detectLoop.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/2.detectLoop/detectLoop.js) | Easy | Floyd's cycle-finding or Tortoise and Hare algorithm |
| 3 | Merge two sorted lists | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/3.mergeTwoSortedLists/mergeTwoSortedLists.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/mergeTwoSortedLists.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/3.mergeTwoSortedLists/mergeTwoSortedLists.md) | Easy | Arithmetic comparison |
| 4 | Merge K sorted lists | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/4.mergeKSortedLists/mergeKSortedLists.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/4.mergeKSortedLists/mergeKSortedLists.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/4.mergeKSortedLists/mergeKSortedLists.js) | Hard | Divide and conquer |
| 5 | Remove Kth node from end of list | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/5.removeKthNodeFromEnd/removeKthNodeFromEnd.js) | [JavaScript](https://livecodes.io/?console&xhttps://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/5.removeKthNodeFromEnd/removeKthNodeFromEnd.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/5.removeKthNodeFromEnd/removeKthNodeFromEnd.js) | Medium | Two pointers |
| 6 | Reorder list | [Source](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/6.reorderList/reorderList.js) | [Javascript](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/6.reorderList/reorderList.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/6.reorderList/reorderList.js) | Medium | Two pointers |
| 7 | Find middle node | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/7.findMiddleNode/findMiddleNode.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/7.findMiddleNode/findMiddleNode.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/7.findMiddleNode/findMiddleNode.md) | Easy | Two pointers |
| 8 | Find Kth node from end of list | [Source](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/8.findKthNodeFromEnd/findKthNodeFromEnd.js) | [JavaScript](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/8.findKthNodeFromEnd/findKthNodeFromEnd.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/8.findKthNodeFromEnd/findKthNodeFromEnd.md) | Easy | Two pointers |
| 9 | Partition list | [Source](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/9.partitionList/partitionList.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/9.partitionList/partitionList.js) | [Documentation](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/9.partitionList/partitionList.md) | Medium | Two pointers |
| 10 | Remove duplicates | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/10.removeDuplicates/removeDuplicates.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/10.removeDuplicates/removeDuplicates.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/10.removeDuplicates/removeDuplicates.md) | Easy | Two pointers |
| 11 | Binary to decimal | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/11.binaryToDecimal/binaryToDecimal.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/11.binaryToDecimal/binaryToDecimal.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/linkedlist/11.binaryToDecimal/binaryToDecimal.md) | Easy | List traversal and math operations |### Doubly linkedlist
| No. | Name | Source | Playground | Documentation | Level | Pattern |
| :-: | :------------------------------- | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----: | :--------------------------------------------------: |
| 1 | Swap first and last | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/doublyLinkedlist/1.swapFirstAndLast/swapFirstAndLast.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/doublyLinkedlist/1.swapFirstAndLast/swapFirstAndLast.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/doublyLinkedlist/1.swapFirstAndLast/swapFirstAndLast.md) | Easy | Swap nodes |
| 2 | Palindrome check | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/doublyLinkedlist/2.palindromeCheck/palindromeCheck.js) | [Playground](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/doublyLinkedlist/2.palindromeCheck/palindromeCheck.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/doublyLinkedlist/2.palindromeCheck/palindromeCheck.md) | Easy | Two pointers |
| 3 | Swap node pairs | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/doublyLinkedlist/3.SwapNodePairs/SwapNodePairs.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/doublyLinkedlist/3.SwapNodePairs/SwapNodePairs.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/doublyLinkedlist/3.SwapNodePairs/SwapNodePairs.md) | Medium | List traversal and update pointers |### Tree
| No. | Name | Source | Playground | Documentation | Level | Pattern |
| :-: | :--------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------: | :---: | :------------------------------------: |
| 1 | Maximum depth of binary tree | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/1.maxDepthBinaryTree/maxDepthBinaryTree.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/1.maxDepthBinaryTree/maxDepthBinaryTree.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/1.maxDepthBinaryTree/maxDepthBinaryTree.js) | Easy | Depth First Search(DFS) with recursion |
| 2 | Same tree | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/2.sameTree/sameTree.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/2.sameTree/sameTree.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/2.sameTree/sameTree.md) | Easy | Depth First Search(DFS) with recursion |
| 3 | Invert or Flip binary tree | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/3.invertTree/invertTree.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/3.invertTree/invertTree.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/3.invertTree/invertTree.js) | Easy | Swapping nodes and Depth First Search(DFS) with recursion |
| 4 | Binary tree maximum path sum | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/4.maxPathSum/maxPathSum.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/4.maxPathSum/maxPathSum.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/4.maxPathSum/maxPathSum.md) | Hard | DFS using recursion |
| 5 | Binary tree level order traversal | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/5.levelOrderTraversal/levelOrderTraversal.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/5.levelOrderTraversal/levelOrderTraversal.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/5.levelOrderTraversal/levelOrderTraversal.js) | Easy | Depth First Search(DFS) with recursion |
| 6 | Serialize and deserialize binary tree | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/6.serializeDeserialize/serializeDeserialize.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/6.serializeDeserialize/serializeDeserialize.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/6.serializeDeserialize/serializeDeserialize.md) | Hard | DFS preorder traversal |
| 7 | Subtree of another tree | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/7.subtree/subtree.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/7.subtree/subtree.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/7.subtree/subtree.js) | Easy | Depth First Search(DFS) with recursion |
| 8 | Construct binary tree from preorder and inorder traversal | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/8.buildTree/buildTree.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/8.buildTree/buildTree.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/8.buildTree/buildTree.md) | Medium | DFS with recursion |
| 9 | Validate BST | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/9.validateBST/validateBST.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/9.validateBST/validateBST.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/9.validateBST/validateBST.js) | Medium | Depth-First-Search(DFS) using recursion |
| 10 | Kth smallest element in BST | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/10.kthSmallestBST/kthSmallestBST.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/10.kthSmallestBST/kthSmallestBST.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/10.kthSmallestBST/kthSmallestBST.js) | Medium | Iterative inorder traversal using stack |
| 11 | Lowest Common Ancestor of BST | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/11.lowestCommonAncestor/lowestCommonAncestor.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/11.lowestCommonAncestor/lowestCommonAncestor.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/11.lowestCommonAncestor/lowestCommonAncestor.md) | Medium | Iterative tree traversal |
| 12 | Trie | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/12.trie/trie.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/12.trie/trie.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/12.trie/trie.js) | Medium | Iteration over string characters |
| 13 | Design and Search words Datastructure | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/13.wordDictionary/wordDictionary.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/13.wordDictionary/wordDictionary.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/13.wordDictionary/wordDictionary.md) | Medium | Trie and DFS recursion |
| 14 | Word search 2 | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/14.wordSearch2/wordSearch2.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/14.wordSearch2/wordSearch2.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/14.wordSearch2/wordSearch2.js) | Hard | Backtracking with Trie |### Graph
| No. | Name | Source | Live | Documentation | Level | Pattern |
| :-: | :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----: | :-------------------------------: |
| 1 | Clone graph | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/1.cloneGraph/cloneGraph.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/1.cloneGraph/cloneGraph.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/1.cloneGraph/cloneGraph.js) | Medium | Depth-First-Search(DFS) using recursion |
| 2 | Course schedule | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/2.courseSchedule/courseSchedule.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/2.courseSchedule/courseSchedule.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/2.courseSchedule/courseSchedule.md) | Medium | DFS using recursion |
| 3 | Pacific Atlantic waterflow | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/3.pacificAtlantic/pacificAtlantic.js) | [Playground](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/3.pacificAtlantic/pacificAtlantic.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/3.pacificAtlantic/pacificAtlantic.md) | Medium | DFS using recursion |
| 4 | Number of Islands | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/4.numberOfIslands/numberOfIslands.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/4.numberOfIslands/numberOfIslands.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/4.numberOfIslands/numberOfIslands.md) |Medium | DFS using recursion |
| 5 | Alien dictionary | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/5.alienDictionary/alienDictionary.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/5.alienDictionary/alienDictionary.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/5.alienDictionary/alienDictionary.md) |Hard | Kahn's algorithm for topological sorting |
| 6 | Graph valid tree | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/6.graphValidTree/graphValidTree.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/6.graphValidTree/graphValidTree.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/6.graphValidTree/graphValidTree.md) | Medium | Union Find algorithm(+ union by rank & path compression) |
| 7 | Number of connected components in an undirected graph | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/7.numberOfConnectedComponents/numberOfConnectedComponents.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/7.numberOfConnectedComponents/numberOfConnectedComponents.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/graph/7.numberOfConnectedComponents/numberOfConnectedComponents.md) | Medium | Union Find algorithm(+ union by rank & path compression) |### Matrix
| No. | Name | Source | Live | Documentation | Level | Pattern |
| :-: | :--------------- | :-----------------------------------------------------------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----: | :--------------------------------: |
| 1 | Set matrix zeros | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/matrix/1.setMatrixZeroes/setMatrixZeroes.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/matrix/1.setMatrixZeroes/setMatrixZeroes.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/matrix/1.setMatrixZeroes/setMatrixZeroes.md) | Medium | In-place updates through traversal |
| 2. | Spiral matrix | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/matrix/2.spiralMatrix/spiralMatrix.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/matrix/2.spiralMatrix/spiralMatrix.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/matrix/2.spiralMatrix/spiralMatrix.md) | Medium | Boundary matrix traversal/spiral pattern |
| 3 | Rotate image | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/matrix/3.rotateImage/rotateImage.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/matrix/3.rotateImage/rotateImage.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/matrix/3.rotateImage/rotateImage.md) | Medium | Inplace square rotation |
| 4 | Word search | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/matrix/4.wordSearch/wordSearch.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/matrix/4.wordSearch/wordSearch.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/matrix/4.wordSearch/wordSearch.md) | Medium | Depth-First Search (DFS) using recursion |### Interval
| No. | Name | Source | Live | Documentation | Level | Pattern |
| :-: | :------------------------ | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----: | :-------------------------------: |
| 1 | Insert interval | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/1.insertInterval/insertInterval.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/1.insertInterval/insertInterval.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/1.insertInterval/insertInterval.md) | Medium | Basic math operations |
| 2 | Merge interval | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/2.mergeInterval/mergeInterval.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/2.mergeInterval/mergeInterval.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/2.mergeInterval/mergeInterval.md) | Medium | Sorting and basic math operations |
| 3 | Non-overlapping intervals | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/3.nonOverlappingIntervals/nonOverlappingIntervals.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/3.nonOverlappingIntervals/nonOverlappingIntervals.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/3.nonOverlappingIntervals/nonOverlappingIntervals.md) | Medium | Greedy and basic math operations |
| 4 | Meeting rooms | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/4.meetingRooms/meetingRooms.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/4.meetingRooms/meetingRooms.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/4.meetingRooms/meetingRooms.md) | Medium | Greedy and basic math operations |
| 5 | Meeting rooms 2 | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/5.meetingRooms2/meetingRooms2.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/5.meetingRooms2/meetingRooms2.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/interval/5.meetingRooms2/meetingRooms2.md) | Medium | Two pointers |### Hashtable
| No. | Name | Source | Live | Documentation | Level | Pattern |
| :-: | :---------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----: | :---------------------: |
| 1 | Duplicates | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/1.duplicates/duplicates.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/1.duplicates/duplicates.js) | [JavaScript](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/1.duplicates/duplicates.md) | Easy | Using Map |
| 2 | Two sum | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/2.twoSum/twoSum.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/2.twoSum/twoSum.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/2.twoSum/twoSum.md) | Easy | Using Map |
| 3 | First non repeating character | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/3.firstNonRepeatingCharacter/firstNonRepeatingCharacter.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/3.firstNonRepeatingCharacter/firstNonRepeatingCharacter.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/3.firstNonRepeatingCharacter/firstNonRepeatingCharacter.md) | Easy | Using Map |
| 4 | Group anagrams | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/4.groupAnagrams/groupAnagrams.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/4.groupAnagrams/groupAnagrams.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/4.groupAnagrams/groupAnagrams.md) | Medium | Using Map & its methods |
| 5 | Verify Common Elements | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/5.verifyCommonElements/verifyCommonElements.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/5.verifyCommonElements/verifyCommonElements.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/5.verifyCommonElements/verifyCommonElements.md) | Easy | Using Map methods |
| 6 | Longest consequtive sequence |[Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/6.longestConsecutiveSequence/longestConsecutiveSequence.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/6.longestConsecutiveSequence/longestConsecutiveSequence.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/hashtable/6.longestConsecutiveSequence/longestConsecutiveSequence.md) | Medium | Find sequence using set or hash table |## Sorting
| No. | Name | Source | Playground | Documentation | Level | Complexity |
| :-: | :------------- | :-------------------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------: | :----: | :--------------------------------: |
| 1 | Bubble sort | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/bubbleSort/bubbleSort.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/bubbleSort/bubbleSort.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/bubbleSort/bubbleSort.md) | Easy | TC: O(n2), SC: O(1) |
| 2 | Selection sort | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/selectionSort/selectionSort.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/selectionSort/selectionSort.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/selectionSort/selectionSort.md) | Easy | TC: O(n2), SC: O(1) |
| 3 | Insertion sort | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/insertionSort/insertionSort.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/insertionSort/insertionSort.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/insertionSort/insertionSort.md) | Easy | TC: O(n2), SC: O(1) |
| 4 | Merge sort | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/mergeSort/mergeSort.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/mergeSort/mergeSort.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/mergeSort/mergeSort.md) | Medium | TC: O(n log(n)), SC: O(n) |
| 5 | Quick sort | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/quickSort/quickSort.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/quickSort/quickSort.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/quickSort/quickSort.md) | Medium | TC: O(n2), SC: O(log n) |
| 6 | Heap sort | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/heapSort/heapSort.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/heapSort/heapSort.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/sorting/heapSort/heapSort.md) | Hard | TC: O(n log(n)), SC: O(1) |