Search
⌘K

Leetcode 3254. Find the Power of K-Size Subarrays I

For each k-length subarray, determine whether its elements form a strictly increasing consecutive sequence (each element = previous + 1); if so return its maximum (the last element), otherwise return -1. This is essentially a sliding-window check that validates adjacency in each window and outputs either the window's last value or -1.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.