LessonΒ·difficulty 2/5Β·~15 min
Keep one result per request
Implement unique_requests(request_ids).
Return unique string request IDs in their original first-seen order. Do not sort and do not mutate the input. This models identifying repeated deliveries of a logical request.
Before coding, predict one result by hand. After the tests pass, explain your approach and add a boundary example of your own.
Tests
- Case 1
- Case 2
- Case 3
β¦ Stuck? Ask for a spark
Sign in or create a free account to use your monthly AI explainer allowance.
warming up
Loading editorβ¦
Consolewaiting
$ Console output will appear here.