Find Idle Skill Query
Reported by candidates from Amazon's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
Amazon's 'Find Idle Skill Query' showed up in April 2025 OAs, and it's the kind of problem that looks deceptively simple on the surface. You're almost certainly working with a dataset of skills and time-based activity tracking, trying to identify which skills haven't been used recently. The trap is assuming brute force counts will pass. StealthCoder will catch the efficient pattern if you blank on the index choice during the live OA.
Pattern and pitfall
This is fundamentally a hash-table and time-series filtering problem wrapped in business logic. The pattern: store skill usage with timestamps, then query for skills matching an idle threshold (no activity within X days or weeks). Most candidates iterate through all skills and all timestamps for each query, which tanks on large datasets. The real move is pre-sorting or indexing by skill, then using binary search or a sorted structure to find the cutoff point fast. The gotcha is handling edge cases like skills with zero activity ever, or ties in recency. StealthCoder will spot whether you need a HashMap with a list of timestamps per skill, a heap, or a sorted map depending on query patterns.
Memorize the pattern. If you can't, run StealthCoder. The proctor sees the IDE. They don't see what's behind it.
You can drill Find Idle Skill Query cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge.
Get StealthCoderRelated leaked OAs
You've seen the question.
Make sure you actually pass Amazon's OA.
Amazon reuses patterns across OAs. Made by an engineer who treats the OA as theater. If yours is tonight, you don't have time to grind. You have time to hedge. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Find Idle Skill Query FAQ
Is this problem asking me to find all skills that haven't been used, or just check if specific skills are idle?+
Based on the title 'Query', it's likely parametrized: you're given a threshold (days or timestamp), and you return which skills fall below that threshold. Read the problem statement carefully for whether you're filtering a whole dataset or answering multiple queries. Multiple queries means you need efficient lookups, not re-scanning every time.
What's the trick Amazon usually hides in this type of problem?+
The trick is recognizing that if you have multiple queries, you can't afford O(n*m) iteration per query. Pre-index by skill, store timestamps sorted, then use binary search to find the most recent activity for each skill. That drops repeated queries to O(log n) instead of O(n).
Should I use a HashMap with lists, or something like a TreeMap?+
HashMap with sorted lists per skill is clean and works well. TreeMap (if available in your language) can also work, but the question is whether you need range queries on timestamps. For this problem, sorted lists inside a HashMap are usually sufficient and easier to reason about.
What happens if a skill has never been used?+
It should be treated as idle from the very beginning. If your threshold is 'no activity in the last 30 days', a skill with zero usage is definitely idle. Don't assume all skills have at least one timestamp. Handle the empty case explicitly in your logic.
Can I solve this in 48 hours of prep if I've never seen it before?+
Yes, if you've done hash-table and binary search problems. The pattern is standard. Focus on: storing data efficiently, understanding the query semantics (what does 'idle' mean exactly), and avoiding nested loops. Run through a small example by hand to lock in the logic.