Array
3578. Count Partitions With Max-Min Difference at Most K
Given an array nums and k. Find the number of ways to split the array into consecutive non-empty segments so that in each segment (max−min) ≤ k. Modulo 1e9+7.
Loading…
Given an array nums and k. Find the number of ways to split the array into consecutive non-empty segments so that in each segment (max−min) ≤ k. Modulo 1e9+7.
Loading…