Problem Solving on Paper
MaxAB interview question (Egypt) · stage: Technical Interview · domain: Coding · role: Backend Engineer · difficulty: Medium · asked once, last in April 2025
What they ask
Same round as the SQL questions: the engineering manager hands you a printed sheet and you solve on paper, talking through your approach. The problems are general problem solving rather than a specific framework, sized to fit in a few minutes each.
A representative one:
You get a list of order timestamps (Unix seconds) for one warehouse in a day, unsorted. Return the start of the busiest 60-minute window, meaning the window containing the most orders. On ties, return the earliest start.
Examples
[100, 200, 3700, 3800, 3900], window 3600 seconds: the window starting at3700holds3700, 3800, 3900(3 orders), so return3700. The window starting at200only holds200, 3700.[0, 1000, 5000, 6000]: two windows tie with 2 orders each, return the earlier start,0.
Constraints
- Up to 10^5 timestamps, values fit in 64-bit integers.
- A window is inclusive at the start and exclusive at the end:
[start, start + 3600). - A window may start at an order timestamp; that is sufficient, and you should be able to argue why.
What they look for
- A correct brute force first, stated clearly, then the sorted two-pointer improvement.
- Handwritten code that would actually run: an off-by-one on the window boundary is the usual mistake.
- Complexity you can defend:
O(n log n)for the sort,O(n)for the sweep. - Clarifying questions before writing, for example whether timestamps can repeat.
You will not have a compiler, so walk through your code on the first example line by line.