Fall SalePremium questions, over 25% offUnlock all premium questions for over 25% off
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.
...
More CodeSignal OAs interview questions
- OA [CodeSignal] Purchase Optimizationhard
- OA [CodeSignal] Minimum Operation To Reduce n To 0medium
- OA [CodeSignal] Minimum Edge Reversal Roothard
- OA [CodeSignal] Max Throughput With Budgethard
- OA [CodeSignal] Longest Subsequence With Limited Summedium
- OA[CodeSignal] Find Effective Communication Channelsmedium
- OA[CodeSignal] Employee Management Systemhard
- OA[CodeSignal] In-Memory Databasehard
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.