Reported October 2024
Amazonarray

Get Smaller Items

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 'Get Smaller Items' hit the October 2024 assessments, and it's a filtering problem that looks deceptively simple at first glance. You're given a list of items with some property, and you need to return only those that meet a size or value threshold. The trick isn't the filter itself. It's knowing what 'smaller' means in the context of the input, and whether you're supposed to maintain order, deduplicate, or return a count. If you blank on the exact definition during the live OA, StealthCoder reads the problem statement and gives you the pattern in seconds.

Pattern and pitfall

This is a straightforward filtering or selection problem, likely rooted in array manipulation and conditional logic. You iterate through the input, compare each item against a threshold, and collect results. The edge cases are where most candidates slip: empty inputs, all items passing or failing the filter, handling ties at the boundary. The pattern is simple enough that the real test is precision and clean code. If the problem includes sorting or multi-attribute comparison, it becomes a two-pointers or sorting problem. During the OA, you need to read the full problem statement carefully before coding. StealthCoder is your safety net if you misread the condition or forget the exact filtering rule mid-implementation.

StealthCoder is the hedge for the one pattern you didn't drill. It runs invisibly during the screen share.

If this hits your live OA

You can drill Get Smaller Items 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. If you're reading this with an OA window open, you're who this was built for.

Get StealthCoder

Related leaked OAs

⏵ The honest play

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

Amazon reuses patterns across OAs. If you're reading this with an OA window open, you're who this was built for. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Get Smaller Items FAQ

Is this a sorting problem or just a filter?+

Without the full problem text, it's hard to say. 'Smaller items' could mean a simple filter (return all items under a threshold) or it could require sorting first. Read the problem statement carefully. If the output needs to be in a specific order, it's sorting-adjacent. If it's just 'return items that meet this condition,' it's pure filtering.

What's the most common mistake candidates make on this?+

Misreading what 'smaller' refers to. Is it price, weight, quantity, or something else. Another common trap is forgetting to return the items themselves versus returning a count or index. Read the output format carefully and trace through a small example before coding.

How long should the solution take to code?+

A basic filter is 3-5 minutes if you understand the problem. If it involves sorting or multi-step logic, 8-12 minutes. The bulk of time should be reading the problem statement and clarifying the threshold or comparison rule, not coding.

Are there gotchas with duplicates or ordering?+

Possibly. If two items are the same size, do you keep both or deduplicate. Does the output need to preserve input order or be sorted. These details matter. Check the examples carefully. If the problem is ambiguous, code for the most literal interpretation.

Can I solve this in one pass or do I need multiple iterations?+

One pass is usually sufficient for a pure filter. You iterate through the list once, apply the condition, and collect results. If sorting is required, you'll need O(n log n). Most Amazon filtering problems are one-pass unless stated otherwise.

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