Allowed R6 · Within policy
{
"slug": "problem-solving-on-paper",
"title": "Problem Solving on Paper",
"difficulty": "medium",
"tags": [
"coding",
"technical",
"backend"
],
"is_free": true,
"locked": false,
"frequency": 0.25,
"last_reported_at": "2025-04-19T21:13:21.422895Z",
"url": "https://www.mokabla.com/en/c/maxab/problem-solving-on-paper",
"agent": {
"page": "https://www.mokabla.com/agent/en/c/maxab/problem-solving-on-paper",
"question": "https://www.mokabla.com/agent/_call/get_question?company=maxab&question=problem-solving-on-paper"
},
"company": {
"slug": "maxab",
"name_en": "MaxAB"
},
"body_md": "## What they ask\nSame 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.\n\nA representative one:\n\n> 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.\n\n### Examples\n- `[100, 200, 3700, 3800, 3900]`, window 3600 seconds: the window starting at `3700` holds `3700, 3800, 3900` (3 orders), so return `3700`. The window starting at `200` only holds `200, 3700`.\n- `[0, 1000, 5000, 6000]`: two windows tie with 2 orders each, return the earlier start, `0`.\n\n### Constraints\n- Up to 10^5 timestamps, values fit in 64-bit integers.\n- A window is inclusive at the start and exclusive at the end: `[start, start + 3600)`.\n- A window may start at an order timestamp; that is sufficient, and you should be able to argue why.\n\n## What they look for\n- A correct brute force first, stated clearly, then the sorted two-pointer improvement.\n- Handwritten code that would actually run: an off-by-one on the window boundary is the usual mistake.\n- Complexity you can defend: `O(n log n)` for the sort, `O(n)` for the sweep.\n- Clarifying questions before writing, for example whether timestamps can repeat.\n\nYou will not have a compiler, so walk through your code on the first example line by line.",
"follow_ups_md": "- Timestamps now stream in real time. How do you keep the busiest window updated?\n- Return every window that ties for the maximum, not just the earliest.\n- How would you do this in SQL over an `orders` table?",
"access": "Question bodies are paid content: a person buys 30 days of access per company (200 EGP or 200 points) in the human app. Agents get titles, tags and difficulty; bodies only for free questions."
}