Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tanishraj/data-structures-and-algorithms
Leet Code Problems with solutions using DS and Algo
https://github.com/tanishraj/data-structures-and-algorithms
Last synced: 23 days ago
JSON representation
Leet Code Problems with solutions using DS and Algo
- Host: GitHub
- URL: https://github.com/tanishraj/data-structures-and-algorithms
- Owner: tanishraj
- License: mit
- Created: 2021-06-03T19:05:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-09T18:51:00.000Z (9 months ago)
- Last Synced: 2024-05-09T19:57:45.679Z (9 months ago)
- Language: JavaScript
- Size: 67.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Leet Code + Data Structure + Polyfills in Javascript
- This repo consists of 3 categories of problems, completely based on Javascript Programming Language, which are asked in interviews.
> Leet Code Problem
> Basic Data Structure Problems
> Polyfills for JS Methods
- You can find the code in respective folders.
- You'r welcome to contribute to this repo, if you get any questions that is asked in your interview.## Leet Code Problems
| Problems | Solution |
| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| Even or Odd w/o conditional statement | [Even or Odd](./javascript-problems/even-or-odd-without-condition.js) |
| Convert Decimal into Binary | [Decimal to Binary](./javascript-problems/Convert-Decimal-into-Binary.js) |
| Find Max value in an array | [Find Max value](./javascript-problems/Find-Max-value-in-an-array.js) |
| Find Missing Number in an array | [Find Missing Number](./javascript-problems/Find-Missing-Number-in-an-array.js) |
| Flatten Array | [Flatten Array](./javascript-problems/Flatten-Array.js) |
| Flatten an array | [Flatten an array](./javascript-problems/Flatten-an-array.js) |
| Number of Student Working in time slot | [Number of Student Working](./javascript-problems/MMT:-Number-of-Student-Working-in-time-slot.js) |
| Matching Brackets | [Matching Brackets](./javascript-problems/Matching-Brackets.js) |
| Max Consecutive 1's in Binary Numbers | [Max Consecutive 1's](./javascript-problems/Max-Consecutive-1's-in-Binary-Numbers.js) |
| Max Profit From Stocks | [Max Profit](./javascript-problems/Max-Profit-From-Stocks.js) |
| Max Water Saving Between Buildings (Naive) | [Max Water Saving](<./javascript-problems/Max-Water-Saving-Between-Buildings-(Naive).js>) |
| Max Water Saving Between Buildings | [Max Water Saving](./javascript-problems/Max-Water-Saving-Between-Buildings.js) |
| Maximum Occurance of A char in string | [Maximum Occurance](./javascript-problems/Maximum-Occurance-of-A-char-in-string.js) |
| Min and Max in Array (Naive) | [Min and Max](<./javascript-problems/Min-and-Max-in-Array-(Naive).js>) |
| Min and Max in Array (Optimized) | [Min and Max](<./javascript-problems/Min-and-Max-in-Array-(Optimized).js>) |
| Minimum Shift To Sit Together | [Minimum Shift](./javascript-problems/Minimum-Shift-To-Sit-Together.js) |
| Move Negative Numbers Before Positive Numbers (Naive) | [Move Negative Numbers](<./javascript-problems/Move-Negative-Numbers-Before-Positive-Numbers-(Naive).js>) |
| Move Negative Numbers Before Positive Numbers | [Move Negative Numbers](./javascript-problems/Move-Negative-Numbers-Before-Positive-Numbers.js) |
| Remove Duplicate and Sort Numbers | [Remove Duplicate](./javascript-problems/Remove-Duplicate-and-Sort-Numbers.js) |
| Remove Duplicates (Naive) | [Remove Duplicates](<./javascript-problems/Remove-Duplicates-(Naive).js>) |
| Reverse Number | [Reverse Number](./javascript-problems/Reverse-Number.js) |
| Second Max Occurance | [Second Max Occurance](./javascript-problems/Second-Max-Occurance.js) |
| Second Max Occurrence using Hash Map | [Second Max Occurrence](./javascript-problems/Second-Max-Occurrence-using-Hash-Map.js) |
| Second Most Frequency | [Second Most Frequency](./javascript-problems/Second-Most-Frequency.js) |
| Sort Array of Object By Last name | [Sort Array of Object](./javascript-problems/Sort-Array-of-Object-By-Last-name.js) |
| Sorting Array of Objects | [Sorting Array of Objects](./javascript-problems/Sorting-Array-of-Objects.js) |
| SubArray Chunks | [SubArray Chunks](./javascript-problems/SubArray-Chunks.js) |
| Subarray Sum (Naive) | [Subarray Sum](<./javascript-problems/Subarray-Sum-(Naive).js>) |
| Warmer Temperature | [Warmer Temperature](./javascript-problems/Warmer-Temperature.js) |
| Retain Duplicated Numbers | [Retain Duplicated Numbers](./javascript-problems/Retain-Duplicated-Numbers.js) |
| Sum of SubArray Equals with Number | [Sum of SubArray Equals with Number](./javascript-problems/sum-of-subArray-to-a-value.js) |## Data Structure Problems
| Problems | Solution |
| ------------------ | --------------------------------------------------------------- |
| Singly Linked List | [Singly Linked List](./data-structures/1-singly-linked-list.js) |
| Doubly Linked List | [Doubly Linked List](./data-structures/2-doubly-linked-list.js) |
| Stack (array) | [Stack (array)](./data-structures/3-stack-using-array.js) |
| Stack (class) | [Stack (class)](./data-structures/4-stack-using-class.js) |
| Queue | [Queue](./data-structures/5-queue-using-class.js) |
| Binary Search Tree | [Binary Search Tree](./polyfills/6-binary-search-tree.js) |
| Tree Traversal | [Tree Traversal](./data-structures/7-tree-traversal.js) |## Polyfills
| Polyfills | Solution |
| ----------- | ------------------------------------- |
| Array map() | [Array map()](./polyfills/map.js) |
| Promise | [Promise](./polyfills/promise.js) |
| Promise.all | [Promise](./polyfills/promise.all.js) |
| Reduce | [Promise](./polyfills/reduce.js) |## Solved Leet Problems
| Leet Problems | Solution |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| 844. Backspace String Compare | [Code](./leet-solution/844.BackspaceStringCompare.js) |
| 905. Sort Array By Parity | [Code](./leet-solution/905.SortArrayByParity.js) |
| 581. Shortest Unsorted Continuous Subarray | [Code](./leet-solution/581.ShortestUnsortedContinuousSubarray) |
| 1679. Max Number of K-Sum Pairs | [Code](./leet-solution/1679.MaxNumberofK-SumPairs.js) |
| 1. Two Sum | [Code](./leet-solution/1.TwoSum.js) |
| 15. Three Sum | [Code](./leet-solution/15.3Sum.js) |
| 225. Implement Stack using Queues | [Code](./leet-solution/225.ImplementStackusingQueues.js) |
| 1209. Remove All Adjacent Duplicates in String II | [Code](./leet-solution/1209.RemoveAllAdjacentDuplicatesinStringII.js) |
| 9. Palindrome Number | [Code](./leet-solution/9.PalindromeNumber.js) |
| 341. Flatten Nested List Iterator | [Code](./leet-solution/341.FlattenNestedListIterator.js) |
| 63. Unique Paths II | [Code](./leet-solution/63.UniquePathsII.js) |
| 62. Unique Paths | [Code](./leet-solution/62.UniquePaths.js) |
| 322. Coin Change | [Code](./leet-solution/322.CoinChange.js) |
| 1689. Partitioning Into Minimum Number Of Deci-Binary Numbers | [Code](./leet-solution/1689.PartitioningIntoMinimumNumberOfDeci-BinaryNumbers.js) |
| 26. Remove Duplicates from Sorted Array | [Code](./leet-solution/26.Remove_Duplicates_from_Sorted_Array.js) |
| 27. Remove Elements | [Code](./leet-solution/27.Remove_Element.js) |
| 682. Baseball Game | [Code](./leet-solution/682.Baseball_Game.js) |
| 707. Design Linked List | [Code](./leet-solution/707.Design_Linked_List.js) |
| 1472. Design Browser History | [Code](./leet-solution/1472.Design_Browser_History.js) |
| 125. Valid Palindrome | [Code](./leet-solution/125.Valid_Palindrome.js) |