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
Complete the program for [4, 2, 4, 7, 2, 2, 9]. Skip each value whose earlier occurrence is found, then count its full frequency and increment exactly one of uniqueCount or duplicateCount.
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.