Reported November 2024
IBMhash table

Get Query Answers

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 Get Query Answers showed up in November 2024 OAs, and it's a parsing and lookup problem disguised as something harder than it is. You'll read a series of queries, match them against a knowledge base, and return the right answers in the right order. The trap is messy input handling and off-by-one errors in indexing. StealthCoder is your safety net if you blank on the exact parsing logic during the live assessment.

Pattern and pitfall

This is fundamentally a hash-table lookup with string parsing. Build a dictionary from the knowledge base, then iterate through queries and fetch answers. The pattern isn't algorithmic complexity; it's correctness under pressure. Candidates often mishandle whitespace, skip edge cases like missing keys, or return results in the wrong format. The common pitfall is assuming all queries exist in your lookup table. Write defensive code that handles not-found gracefully. If you nail the parsing and the hash, you're done in 15 minutes.

The honest play: practice the pattern, and have StealthCoder ready for the one you didn't see coming.

If this hits your live OA

You can drill Get Query Answers 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 for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play.

Get StealthCoder

Related leaked OAs

⏵ The honest play

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

IBM reuses patterns across OAs. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Get Query Answers FAQ

Is this really just a hash table lookup?+

Yes. Build a dictionary, query it, return answers. The difficulty is parsing the input correctly and handling queries that don't match. The algorithm itself is trivial. Focus on format and edge cases, not complexity.

What's the trick IBM is looking for?+

Attention to detail. Can you parse messy input, handle missing keys gracefully, and return the output in the exact format they want? That's the bar. No fancy algorithm. Just correct implementation.

How do I prepare for this in 48 hours?+

Practice string parsing and dictionary operations in your language. Write a few small parsers. Make sure you handle edge cases like whitespace, empty queries, and unknown keys. Test your output format against the examples multiple times.

Will this pattern show up again at IBM?+

Probably. IBM repeats similar lookup and parsing problems. If you solve this one carefully, you'll see the template again. The company likes problems that test attention and correctness over raw algorithm skill.

What's the biggest gotcha candidates miss?+

Assuming every query has an answer. Read the problem statement carefully. If a query isn't found, what should you return. null. empty string. an error code. Get that wrong and you fail test cases silently.

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