Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nazemmahmud/leetcode-solve
My solve of leetcode problems
https://github.com/nazemmahmud/leetcode-solve
Last synced: about 1 month ago
JSON representation
My solve of leetcode problems
- Host: GitHub
- URL: https://github.com/nazemmahmud/leetcode-solve
- Owner: NazemMahmud
- Created: 2022-07-20T10:17:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-22T04:10:48.000Z (about 1 year ago)
- Last Synced: 2023-10-22T05:34:37.138Z (about 1 year ago)
- Language: JavaScript
- Size: 183 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
My leetcode solutions**Profile:** https://leetcode.com/piash001
| Problem No. | Problem and Solution link | Algorithm type |
|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|
| 1 | Problem: [Two Sum](https://leetcode.com/problems/two-sum)
Solution: [Solution Link](1_Two_Sum/1-Two-Sum.js) | Array, Hashmap |
| 2 | Problem: [Add two numbers](https://leetcode.com/problems/add-two-numbers)
Solution: [Solution Link](2-add-two-numbers.js) | Linked list |
| 3 | Problem: [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/description)
Solution: [Solution Link](3-Longest-Substring-Without-Repeating-Characters/3-Longest-Substring-Without-Repeating-Characters.js) | String, Sliding window, HashMap |
| 11 | Problem: [Container With Most Water](https://leetcode.com/problems/container-with-most-water)
Solution: [Solution Link](11-Container With Most Water.js) | Two Pointer, Greedy, Array |
| 12 | Problem: [Integer to Roman](https://leetcode.com/problems/integer-to-roman)
Solution: [Solution Link](12-Integer to Roman.js) | Hash |
| 17 | Problem: [Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number)
Solution: [Solution Link](17-Letter Combinations of a Phone Number.js) | Hash, DFS, Backtrack |
| 21 | Problem: [Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/)
Solution: [Solution Link](21-merge-two-sorted-lists.js) | Linked list |
| 34 | Problem: [Find First and Last Position of Element in Sorted Array](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/)
[Solution Link](34-find-first-and-last-position-of-element-in-sorted-array.js) | Binary search |
| 57 | Problem: [Insert Interval](https://leetcode.com/problems/insert-interval)
[Solution Link](57-Insert Interval.js) | Array |
| 69 | Problem: [Sqrt(x)](https://leetcode.com/problems/sqrtx/)
[Solution Link](69-sqrt-x.js) | Binary search |
| 74 | Problem: [Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix)
[Solution Link](74-search-a-2D-matrix.js) | Binary search, Divide and Conquer, Matrix |
| 83 | Problem: [Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list)
[Solution Link](83-Remove Duplicates from Sorted List.js) | Linked list |
| 88 | Problem: [Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array)
[Solution Link](88-Merge Sorted Array.js) | Two pointer / One pointer |
| 94 | Problem: [Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/)
[Solution Link](94-Binary Tree Inorder Traversal.js) | Binary Tree, DFS, Tree, Inorder traversal |
| 100 | Problem: [Same Tree](https://leetcode.com/problems/same-tree)
[Solution Link](100-Same Tree.txt) | Binary tree |
| 101 | Problem: [Symmetric Tree](https://leetcode.com/problems/symmetric-tree)
[Solution Link](101: Symmetric Tree.js) | Binary tree, Recursion |
| 104 | Problem: [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree)
[Solution Link](114-Maximum Depth of Binary Tree.js) | Binary tree, DFS, BFS |
| 108 | Problem: [Convert Sorted Array to Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree)
[Solution Link](108-Convert Sorted Array to Binary Search Tree.js) | Tree, Binary Search tree, Array |
| 110 | Problem: [Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree)
[Solution Link](110-Balanced Binary Tree.js) | Tree, Binary tree, DFS |
| 111 | Problem: [Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree)
[Solution Link](111-Minimum Depth of Binary Tree.js) | Tree, Binary tree, BFS |
| 112 | Problem: [Path Sum](https://leetcode.com/problems/path-sum)
[Solution Link](112-Path Sum.js) | Tree, Binary tree, DFS |
| 114 | Problem: [Flatten Binary Tree to Linked List](https://leetcode.com/problems/flatten-binary-tree-to-linked-list)
[Solution Link](114-Flatten Binary Tree to Linked List.js) | Binary tree, Morris traversal(need study), Linked List, |
| 118 | Problem: [Pascal's Triangle](https://leetcode.com/problems/pascals-triangle)
[Solution Link](118-Pascals Triangle.js) | Adhoc |
| 119 | Problem: [Pascal's Triangle-II](https://leetcode.com/problems/pascals-triangle-ii)
[Solution Link](119-Pascals Triangle-II.js) | Adhoc |
| 121 | Problem: [Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock)
[Solution Link](121-Best Time to Buy and Sell Stock.js) | Array, Max. Sub array, Kadane's Algo |
| 125 | Problem: [Valid Palindrome](https://leetcode.com/problems/valid-palindrome)
[Solution Link](125-Valid Palindrome.js) | Adhoc, Two Pointers |
| 134 | Problem: [Single Number](https://leetcode.com/problems/gas-station)
[Solution Link](134-Single Number.js) | Array, Greedy, Max num of point visit in a circular manner |
| 136 | Problem: [Single Number](https://leetcode.com/problems/single-number)
[Solution Link](136-Single Number.js) | Bitwise manipulation, hash (worse) |
| 141 | Problem: [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle)
[Solution Link](141-Linked List Cycle.js) | Linked List, Hashing, Floyd’s Cycle Detection Algorithm |
| 149 | Problem: [Max Points on a Line](https://leetcode.com/problems/max-points-on-a-line)
[Solution Link](149-Max Points on a Line.js) | Array, Math, Geometry |
| 160 | Problem: [Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists)
[Solution Link](160-Intersection of Two Linked Lists.js) | Linked List, Two Pointer |
| 167 | Problem: [Two Sum II - Input Array Is Sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted)
[Solution Link JS](167_Two_Sum_II/167-Two-Sum-2-Input-Array-Is-Sorted.js)
[Solution Link php](167_Two_Sum_II/167-Two-Sum-II-Input-Array-Is-Sorted.php) | Array, hashmap, two pointer, binary search |
| 169 | Problem: [Majority Element](https://leetcode.com/problems/majority-element)
[Solution Link](169-Majority Element.js) | Hashing, Sorting, Boyer-Moore Voting Algorithm |
| 171 | Problem: [Excel Sheet Column Number](https://leetcode.com/problems/excel-sheet-column-number)
[Solution Link](171-Excel Sheet Column Number.js) | String, Math, |
| 190 | Problem: [Reverse Bits](https://leetcode.com/problems/reverse-bits)
[Solution Link](190-Reverse Bits.js) | Bit manipulation |
| 191 | Problem: [Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits)
[Solution Link](191-Number of 1 Bits.js) | Bit manipulation |
| 200 | Problem: [Number of Islands](https://leetcode.com/problems/number-of-islands)
[Solution Link](200-Number of Islands.js) | DFS, BFS |
| 202 | Problem: [Happy Number](https://leetcode.com/problems/happy-number)
[Solution Link](202-Happy Number.js) | Math |
| 203 | Problem: [Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements)
[Solution Link](203-Remove Linked List Elements.js) | Linked List |
| 206 | Problem: [Reverse Linked List](https://leetcode.com/problems/reverse-linked-list)
Solution: [Solution Link](206-Reverse Linked List.js) | Linked List |
| 207 | Problem: [Course Schedule](https://leetcode.com/problems/course-schedule)
Solution: [Solution Link](207-course-schedule.js) | Topological sort |
| 210 | Problem: [Course Schedule II](https://leetcode.com/problems/course-schedule-ii)
Solution: [Solution Link](210-course-schedule-II.js) | Topological sort |
| 217 | Problem: [Contains Duplicate](https://leetcode.com/problems/contains-duplicate)
Solution: [Solution Link](217-Contains Duplicate.js) | Set, Hash |
| 235 | Problem: [Lowest Common Ancestor of a Binary Search Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree)
Solution: [Solution Link](235-Lowest-Common-Ancestor-of-a-Binary-Search-Tree.js) | DFS, Binary Tree |
| 236 | Problem: [Lowest Common Ancestor of a Binary Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree)
Solution: [Solution Link](236-Lowest-Common-Ancestor-of-a-Binary-Tree.js) | DFS, Binary Tree |
| 240 | Problem: [Search A 2d Matrix II](https://leetcode.com/problems/search-a-2d-matrix-ii)
[Solution Link](240-search-a-2D-matrix-II.js) | Binary search, Divide and Conquer, Matrix |
| 242 | Problem: [Valid Anagram](https://leetcode.com/problems/valid-anagram)
[Solution Link](242-Valid Anagram.js) | Binary search, Divide and Conquer, Matrix |
| 263 | Problem: [Ugly Number](https://leetcode.com/problems/ugly-number)
[Solution Link](263-Ugly Number.php) | Math |
| 283 | Problem: [Move Zeroes](https://leetcode.com/problems/move-zeroes)
[Solution Link](283-Move Zeroes.js) | Array, pointer |
| 290 | Problem: [Word Pattern](https://leetcode.com/problems/word-pattern/description)
[Solution Link](290-Word Pattern.js) | Hash, string |
| 300 `` `` | Problem: [Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence)
[Solution Link](300-Longest Increasing Subsequence.cs) | DP, Binary search |
| 322 | Problem: [Coin Change](https://leetcode.com/problems/coin-change)
[Solution Link](141-Coin Change.js) | DP, top-down approach, can pick infinite no. of items |
| 326 | Problem: [Power of Three](https://leetcode.com/problems/power-of-three)
[Solution Link](326-Power of Three.js) | Math |
| 345 | Problem: [Reverse Vowels of a String](https://leetcode.com/problems/reverse-vowels-of-a-string)
[Solution Link](345-Reverse Vowels of a String.js) | String, Two pointers |
| 350 | Problem: [Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii)
[Solution Link](350-Intersection of Two Arrays II.js) | Array, Hashmap, Count |
| 384 | Problem: [Shuffle an Array](https://leetcode.com/problems/shuffle-an-array)
[Solution Link](384-Shuffle an Array.js) | Array, Math, Random Number |
| 387 | Problem: [First Unique Character in a String](https://leetcode.com/problems/first-unique-character-in-a-string)
[Solution Link](387-First Unique Character in a String.cs) | Hash |
| 412 | Problem: [Fizz Buzz](https://leetcode.com/problems/fizz-buzz)
[Solution Link](412-Fizz Buzz.cs) | Math |
| 443 | Problem: [String Compression](https://leetcode.com/problems/string-compression)
[Solution Link](412-443-String Compression.js) | String, Array, Two Pointers |
| 452 | Problem: [Minimum Number of Arrows to Burst Balloons](https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons)
[Solution Link](452-Minimum Number of Arrows to Burst Balloons.js) | Array, Greedy, Minimum number of segment |
| 509 | Problem: [Fibonacci Number](https://leetcode.com/problems/fibonacci-number)
[Solution Link](509-Fibonacci Number.js) | DP, top-down approach, Fibonacci |
| 520 | Problem: [Detect Capital](https://leetcode.com/problems/detect-capital)
[Solution Link](520-Detect Capital.js) | String |
| 804 | Problem: [Unique Morse Code Words](https://leetcode.com/problems/unique-morse-code-words)
[Solution Link](804-Unique Morse Code Words.js) | Hashmap, Set |
| 890 | Problem: [Find and Replace Pattern](https://leetcode.com/problems/find-and-replace-pattern)
[Solution Link](890-Find and Replace Pattern.js) | Hashmap (Two or one mapping), Array,String match |
| 918 | Problem: [Maximum Sum Circular Subarray](https://leetcode.com/problems/maximum-sum-circular-subarray)
[Solution Link](918-Maximum Sum Circular Subarray.js) | Array, Max Min, Circular Sub-array |
| 944 | Problem: [Delete Columns to Make Sorted](https://leetcode.com/problems/delete-columns-to-make-sorted)
[Solution Link](944-Delete Columns to Make Sorted.js) | Array, String, Adhoc |
| 974 | Problem: [Subarray Sums Divisible by K](https://leetcode.com/problems/subarray-sums-divisible-by-k)
[Solution Link](974-Subarray Sums Divisible by K.js) | Array, Prefix Sum, Hashmap |
| 974 | Problem: [Subarray Sums Divisible by K](https://leetcode.com/problems/subarray-sums-divisible-by-k)
[Solution Link](974-Subarray Sums Divisible by K.js) | Array, Prefix Sum, Hashmap |
| 989 | Problem: [Add to Array-Form of Integer](https://leetcode.com/problems/add-to-array-form-of-integer)
[Solution Link](989-Add to Array-Form of Integer.js) | Array, digit sum |
| 1071 | Problem: Greatest Common Divisor of Strings](https://leetcode.com/problems/greatest-common-divisor-of-strings)
[Solution Link](1071-Greatest Common Divisor of Strings.js) | String, GCD |
| 1137 | Problem: [N-th Tribonacci Number](https://leetcode.com/problems/n-th-tribonacci-number)
[Solution Link](1137-N-th Tribonacci Number.php) | Array, Math |
| 1338 | Problem: [Reduce Array Size to The Half](https://leetcode.com/problems/reduce-array-size-to-the-half)
[Solution Link](1338-Reduce Array Size to The Half.js) | Hash, Sort, Greedy |
| 1833 | Problem: [Maximum Ice Cream Bars](https://leetcode.com/problems/maximum-ice-cream-bars)
[Solution Link](1833-Maximum Ice Cream Bars.js) | Sort, Array, Greedy, Max number of item can be obtained |
| 1462 | Problem: [Course Schedule IV](https://leetcode.com/problems/course-schedule-iv)
[Solution Link](1462-course-schedule-IV.js) | BFS |
| 2007 | Problem: [Find Original Array From Doubled Array](https://leetcode.com/problems/find-original-array-from-doubled-array)
[Solution Link](2007-Find Original Array From Doubled Array.js) | Array, Hash |
| 2244 | Problem: [Minimum Rounds to Complete All Tasks](https://leetcode.com/problems//minimum-rounds-to-complete-all-tasks)
[Solution Link](2244. Minimum Rounds to Complete All Tasks.js) | Array, Hashmap |
| 2274 | Problem: [Maximum Consecutive Floors Without Special Floors](https://leetcode.com/problems/maximum-consecutive-floors-without-special-floors)
[Solution Link](2274-Maximum Consecutive Floors Without Special Floors.js) | Array, Sentinel, Maximum consecutive |
| 2389 | Problem: [Longest Subsequence With Limited Sum](https://leetcode.com/problems/longest-subsequence-with-limited-sum)
[Solution Link](2389-Longest Subsequence With Limited Sum.js) | Prefix sum, Greedy, Binary Search |#### 493,052 -480,673;