https://leetcode.com/problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit/description/
Longest subarray with
Longest subarray with
abs(a[i] - a[j]) <= limit
#medium #sliding_window #monotonic_queue👍2
https://leetcode.com/problems/minimum-number-of-k-consecutive-bit-flips/description/
Count
Count
k
-range flips in binary array to make all 1
#hard #sliding_window👍2
https://leetcode.com/problems/binary-search-tree-to-greater-sum-tree/description/
Aggregate Binary Search Tree from the right #medium #tree
Aggregate Binary Search Tree from the right #medium #tree
👍1
https://leetcode.com/problems/balance-a-binary-search-tree/description/
Make a balanced Binary Search Tree #medium
Make a balanced Binary Search Tree #medium
👍4
https://leetcode.com/problems/maximum-total-importance-of-roads/description/
Sort graph by siblings and compute sum(i*s) #medium
Sort graph by siblings and compute sum(i*s) #medium
👍4
https://leetcode.com/problems/all-ancestors-of-a-node-in-a-directed-acyclic-graph/description/
List of ancestors in a DAG #medium #dfs #toposort
List of ancestors in a DAG #medium #dfs #toposort
👍3
https://leetcode.com/problems/remove-max-number-of-edges-to-keep-graph-fully-traversable/description/
Remove extra nodes in a connected graph by type 1, 2 and 3=1+2 #hard #union-find
Remove extra nodes in a connected graph by type 1, 2 and 3=1+2 #hard #union-find
👍3
https://leetcode.com/problems/intersection-of-two-arrays-ii/description/
Array intersection with duplicates #easy
Array intersection with duplicates #easy
👍2
https://leetcode.com/problems/minimum-difference-between-largest-and-smallest-value-in-three-moves/description/
Min difference after 3 changes in array #medium #sliding_window #dynamic_programming
Min difference after 3 changes in array #medium #sliding_window #dynamic_programming
👍2
https://leetcode.com/problems/merge-nodes-in-between-zeros/description/
Collapse in-between
Collapse in-between
0
nodes in a LinkedList #medium #linked_list👍2
https://leetcode.com/problems/find-the-minimum-and-maximum-number-of-nodes-between-critical-points/description/
[min, max] distance between critical points in linked list #medium #linked_list
[min, max] distance between critical points in linked list #medium #linked_list
👍3
https://leetcode.com/problems/pass-the-pillow/description/
Loop position in increasing-decreasing array #easy #math #simulation
Loop position in increasing-decreasing array #easy #math #simulation
👍3
https://leetcode.com/problems/water-bottles/description/
Bottles drink and exchange simulation #easy #math #simulation
Bottles drink and exchange simulation #easy #math #simulation
👍2
https://leetcode.com/problems/find-the-winner-of-the-circular-game/description/
Last of
Last of
k-th
excluded from 1..n
#medium #simulation #math👍3
https://leetcode.com/problems/average-waiting-time/description/
Average of intersecting intervals #medium #simulation
Average of intersecting intervals #medium #simulation
👍2
https://leetcode.com/problems/reverse-substrings-between-each-pair-of-parentheses/description/
Reverse string in parentheses recursively #medium
Reverse string in parentheses recursively #medium
👍3
https://leetcode.com/problems/maximum-score-from-removing-substrings/description/
Max score removing from
Max score removing from
s
, x
for ab
, y
for ba
#medium #greedy #stack👍2