Reported February 2024
Amazonhash table

Find Recurring Name

Reported by candidates from Amazon's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Amazon OA. Under 2s to a working solution.
Founder's read

Amazon's 'Find Recurring Name' problem landed in February 2024 and it's a straightforward hash-table play that catches people off guard because they overthink it. You're given a collection of names and need to identify which one appears more than once, or find the pattern of recurrence. It sounds simple until you're live and second-guessing yourself on the data structure choice. StealthCoder keeps you honest if you blank on the optimal approach.

Pattern and pitfall

The core pattern is hash-table counting: iterate through the names, store frequencies in a map or dictionary, then find the name(s) that exceed a threshold. Common mistakes: using a set instead of a frequency map, or iterating twice when one pass does it. Some candidates over-engineer with sorting or complex filtering. The trick is recognizing that order doesn't matter and you don't need to sort. If the problem asks for the first recurring name or a specific occurrence, track index alongside count. StealthCoder's real value here is catching your logic error in real time during the OA when you're tired and the proctor is watching.

If this hits your live OA and you blank, StealthCoder solves it in seconds, invisible to the proctor.

If this hits your live OA

You can drill Find Recurring Name 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. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it.

Get StealthCoder

Related leaked OAs

⏵ Practice the LeetCode equivalent

This OA pattern shows up on LeetCode as contains duplicate. If you have time before the OA, drill that.

⏵ The honest play

You've seen the question. Make sure you actually pass Amazon's OA.

Amazon reuses patterns across OAs. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Find Recurring Name FAQ

Do I need to sort the names first?+

No. Sorting adds O(n log n) time for no benefit. Hash-table counting is O(n) and solves it in one clean pass. Save the cycles and keep it simple.

What if there are multiple recurring names?+

Return all of them, or the first one depending on the problem statement. Use the hash-map to collect all names with count > 1, then return the list or iterate to find the earliest index if order matters.

Is this really what Amazon asked in Feb 2024?+

Yes, reported by candidates who took the OA that month. It's a real problem, not a drill. Treat it as a live hedge for your actual assessment.

How do I code this in 2 minutes under pressure?+

Use a dictionary or HashMap. One loop to count, one loop (or one lookup) to find the result. Don't optimize prematurely. Get it right first, then clean it up if time allows.

What's the trap candidates fall into?+

Assuming you need to preserve order or track indices when the problem doesn't ask for it. Also using nested loops to re-check counts instead of building the map once. Keep your logic linear.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Amazon.

OA at Amazon?
Invisible during screen share
Get it