</>OfferRetriever
DashboardDiscuss
NEW

Spring Hire Sale

Limited Time Deal: Unlock all premium questions for over 30% off

$10.42$7.08

08

:

04

:

55

:

57

Get this deal
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. ...