CodingReported in a candidate post, Aug 2021
Count unique elements in an array up to index k
Filed under Shell
The question
Given an array of n integers and an index bound k (where k < n), determine the number of distinct unique elements present in the subarray up to index k.
No write-up yet. Related questions below have one.
Related Shell questions
Collected from public candidate posts and coding forums. Updated Nov 2026.