Leetcode 1630. Arithmetic Subarrays
Given an array nums and m queries [l[i], r[i]], determine for each query whether the elements of the specified subarray can be rearranged to form an arithmetic sequence (i.e., have a constant difference between consecutive terms after permutation). Constraints are small (n, m ≤ 500, values in ±1e5), so per-query checking is feasible.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.