Reported January 2024
Snowflakesorting

Maximum Order Volume

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

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

Snowflake asked this in January 2024 and it's a sorting problem that looks deceptively simple. You're given order data and need to find the maximum volume, but the trick isn't just picking the biggest number. The pattern is about how you organize and aggregate the data before you search. This is the kind of problem where candidates either nail it in 3 minutes or spin their wheels trying to brute force. StealthCoder can spot the sorting angle fast if you blank on the approach.

Pattern and pitfall

The core pattern here is sorting by a key dimension, then either scanning for a maximum or using aggregation to roll up volumes. Most candidates assume they need to find a single order with max volume. The actual task is likely asking you to group orders (by customer, product, or time window) and then find which group has the highest total volume. Sort by that grouping key, aggregate in a single pass, track the max. Common pitfall: forgetting to aggregate before comparing. You scan every order individually and miss that combining them changes the answer. When you're live and stuck, StealthCoder bridges that gap by showing you the grouping structure and the sort order that makes the solution obvious.

If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.

If this hits your live OA

You can drill Maximum Order Volume 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 passed his OA cold and still thinks the filter is broken.

Get StealthCoder

Related leaked OAs

⏵ The honest play

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

Snowflake reuses patterns across OAs. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Maximum Order Volume FAQ

Is this just finding the max value in a list?+

Not quite. You'll likely need to group orders by some dimension (customer, product, date, or category) and sum their volumes first. Then find the group with the highest total. The sorting happens on that grouping key, not the raw values.

What's the time complexity I should aim for?+

O(n log n) for sorting plus O(n) for aggregation. If you're doing nested loops or re-scanning for each group, you're overcomplicating it. Sort once, aggregate once, track max in a single pass.

Do I need a hash table or can I just sort?+

You can do both. Sort by the grouping dimension, then iterate and sum consecutive equal groups. Or use a hash table to aggregate, then find the max key. Both work. Sorting is cleaner if the input is already nearly ordered.

How much time do I have to solve this?+

Snowflake assessments typically give 30-45 minutes per problem. This one should take 10-15 minutes once you see the pattern. Use the rest to code carefully and test edge cases like empty input or single order.

What if there's a tie in volumes?+

The problem likely asks for the maximum volume itself, not the order or group. If there's a tie, return that volume. Check the exact wording for whether you need to return an ID, a name, or just the number.

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

OA at Snowflake?
Invisible during screen share
Get it