Spring Hire Sale
Limited Time Deal: Unlock all premium questions for over 30% off
$10.42$7.08
08
:
03
:
10
:
57
Back to Dashboard
OA [CodeSignal] Shortest Good Subarray
Medium
Given an array arr and an integer k, a subarray is called good if it contains at least k distinct integers.
Return the length of the shortest good subarray. If no such subarray exists, return -1.
...