Sliding Windows
Grouping & Intervals covers the window that grows on the right and shrinks on a repeat. IBM's assessment asks for a few other kinds. A window can hold a fixed number of characters, a span of seconds that widens and narrows with the traffic, or a running product that has to be trimmed whenever it goes over a target. The loop looks the same in all three, and only the rule for moving the left edge changes.
These are the log-processing problems that run through IBM's prompts, the grouping, deduplicating and counting over a window. With intervals included they're close to 29% of IBM's coding, and any of them could arrive as a log. One looks for a pattern that keeps coming back in a string, one watches a gateway for callers over a rate, and one asks how many stretches of compounding rates land exactly on a target.
IBMPremium lesson · Coding round
The 3 IBM problems are below.
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
Each with hints, the follow-up and a tested solution.
Get the IBM questions$49 a year · all 100 companies · cancel anytime
From 328 IBM reports, forum threads behind logins and write-ups in Chinese.
IBM interview guideKnow what IBM asks before you walk in.
30 coding · 3 system design · 13 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.