Opening the reading…
Opening the reading…
DSA FUNDAMENTALS › ARRAY BASICS
This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.
TASK
Write the missing logic for [4, 2, 4, 7, 2, 2, 9]. Scan earlier indices to skip values already seen, scan the full array for each first occurrence, and print each distinct value in exactly one counter.
OUTPUT
SampleUnique: 2 Duplicate: 2
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.