https://leetcode.com/problems/make-lexicographically-smallest-array-by-swapping-elements/description/
Sort by swapping ab, where abs(a - b) < limit #medium
Sort by swapping ab, where abs(a - b) < limit #medium
👍2
https://leetcode.com/problems/maximum-employees-to-be-invited-to-a-meeting/description/
Max connected siblings in graph #hard #dfs #toposort
Max connected siblings in graph #hard #dfs #toposort
👍4
https://leetcode.com/problems/course-schedule-iv/description/
All innodes for each query in graph #medium #dfs #toposort #floyd_warshall
All innodes for each query in graph #medium #dfs #toposort #floyd_warshall
👍2
https://leetcode.com/problems/maximum-number-of-fish-in-a-grid/description/
Largest region in 2D grid #medium #bfs #dfs
Largest region in 2D grid #medium #bfs #dfs
👍3
https://leetcode.com/problems/redundant-connection/description/
First edge making a cycle in graph #medium #union_find
First edge making a cycle in graph #medium #union_find
👍2
https://leetcode.com/problems/divide-nodes-into-the-maximum-number-of-groups/description/
Max count of bipartitions in a graph #hard #bfs #graph
Max count of bipartitions in a graph #hard #bfs #graph
👍2🔥1
https://leetcode.com/problems/making-a-large-island/description/
Max area after filling one empty 2D grid cell #hard #dfs #union_find
Max area after filling one empty 2D grid cell #hard #dfs #union_find
👍2🔥1
https://leetcode.com/problems/check-if-array-is-sorted-and-rotated/description/
Is array sorted and rotated? #easy
Is array sorted and rotated? #easy
🔥2👍1
https://leetcode.com/problems/longest-strictly-increasing-or-strictly-decreasing-subarray/description/
Longest strict monotonic subarray #easy
Longest strict monotonic subarray #easy
🔥3👍1
https://leetcode.com/problems/maximum-ascending-subarray-sum/description/
Max increasing subarray sum #easy
Max increasing subarray sum #easy
🔥2👍1
https://leetcode.com/problems/check-if-one-string-swap-can-make-strings-equal/description/
One swap to make stings equal #easy
One swap to make stings equal #easy
🔥1
https://leetcode.com/problems/tuple-with-same-product/description/
Count uniq 4-tupples a*b=c*d #medium #counting #sort
Count uniq 4-tupples a*b=c*d #medium #counting #sort
👍1🔥1
https://leetcode.com/problems/find-the-number-of-distinct-colors-among-the-balls/description/
Running colors counter #medium #hashmap
Running colors counter #medium #hashmap
👍1🔥1
https://leetcode.com/problems/design-a-number-container-system/description/
Smallest running index of number in map #medium #treeset
Smallest running index of number in map #medium #treeset
👍2🔥1
https://leetcode.com/problems/count-number-of-bad-pairs/description/
Count pairs a[i] - a[j] != j - i #medium #counting #sorting
Count pairs a[i] - a[j] != j - i #medium #counting #sorting
👍1🔥1
https://leetcode.com/problems/remove-all-occurrences-of-a-substring/description/
Remove substring recursively #medium
Remove substring recursively #medium
🔥1
https://leetcode.com/problems/max-sum-of-a-pair-with-equal-sum-of-digits/description/
Max pairs sum with equal digits sum #medium
Max pairs sum with equal digits sum #medium
🔥2
https://leetcode.com/problems/minimum-operations-to-exceed-threshold-value-ii/description/
Count nums += min(x,y)*2+max(x,y) < k #medium #heap
Count nums += min(x,y)*2+max(x,y) < k #medium #heap
👍1🔥1
https://leetcode.com/problems/product-of-the-last-k-numbers/description/
Running suffix product #medium #math #prefix_product
Running suffix product #medium #math #prefix_product
👍2🔥1