Reported February 2024
IBMhash table

Validate Requests

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

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

IBM's Validate Requests question (reported February 2024) is a deceptively simple validation problem that trips candidates who skip the edge cases. You're given a stream of requests and need to determine if they're legitimate based on some constraint set. The trick is recognizing which validation rules actually matter and coding them in the right order. StealthCoder reads the constraints in real time so you don't have to memorize the ruleset before you start coding.

Pattern and pitfall

Validation problems usually hinge on one of three things: rate limiting (requests per time window), format checking (regex or character rules), or state consistency (requests must follow a specific sequence). The common pitfall is implementing the happy path first and bolting on edge cases later. That creates off-by-one errors and logic bugs that are brutal under time pressure. The pattern is typically hash-table (to track state per request ID or timestamp) combined with a pass through the data to check each constraint. StealthCoder acts as your safety net if you blank on the exact validation logic during the live OA, feeding you the structure while you handle implementation.

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 Validate Requests 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

⏵ Practice the LeetCode equivalent

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

⏵ The honest play

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

IBM 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.

Validate Requests FAQ

Is this a rate-limiting problem disguised as validation?+

Possibly. If the problem specifies 'X requests per Y seconds', you're building a sliding window counter (hash-table plus timestamps). If it's just format or state validation, it's simpler. Read the constraint statement twice before coding.

How do I validate without bruteforce?+

Single pass through requests with a hash-table to track IDs, counts, or timestamps. Check each constraint in O(1) or O(log n) per request. Sorting the input by timestamp first is often smart.

What edge case kills most people on this one?+

Boundary conditions: requests arriving at exactly the window edge, duplicate IDs, or the first/last request in the stream. Also, off-by-one in counting (do you include the current request or not).

Should I handle multiple validation rules or just one?+

The problem likely has 2-3 rules. Apply them in sequence. Order matters: if a rule rejects a request, you might stop checking. Read the problem statement carefully for 'AND' vs 'OR' logic.

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

One pass is usually possible if you track state correctly (hash-table + timestamp logic). Two passes is safer if you're unsure; sort first, then validate. Don't optimize prematurely.

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

OA at IBM?
Invisible during screen share
Get it