AGENT CALL · Mokabla · get_question
request ag_4a68730bb5e0

Decision

Allowed   R6 · Within policy

input
{"company":"itworx","question":"array-manipulation-online-test"}

Result

{
  "slug": "array-manipulation-online-test",
  "title": "Array Manipulation Online Test",
  "difficulty": "medium",
  "tags": [
    "coding",
    "oa",
    "swe"
  ],
  "is_free": true,
  "locked": false,
  "frequency": 0.667,
  "last_reported_at": "2026-02-05T13:13:09.425840Z",
  "url": "https://www.mokabla.com/en/c/itworx/array-manipulation-online-test",
  "agent": {
    "page": "https://www.mokabla.com/agent/en/c/itworx/array-manipulation-online-test",
    "question": "https://www.mokabla.com/agent/_call/get_question?company=itworx&question=array-manipulation-online-test"
  },
  "company": {
    "slug": "itworx",
    "name_en": "ITWorx"
  },
  "body_md": "## What they ask\nBefore any human interview there is an online coding test with two or three medium problems. The themes reported are array manipulation and what candidates describe as API integration logic: you are handed data in the shape an API would return and asked to transform, merge or aggregate it. Questions in this area, for example:\n\n**Top customers.** Given an array of order records `{customerId, amount, status}`, return the `k` customers with the highest total of `completed` orders, highest first; break ties by the smaller `customerId`.\n\nExample: orders `[(1, 50, completed), (2, 80, completed), (1, 40, completed), (3, 500, cancelled)]`, `k = 2` gives `[1, 2]` (customer 1 has 90, customer 2 has 80, customer 3 has nothing completed).\n\n**Merging paginated pages.** Given several pages (arrays of items with `id` and `updatedAt`) fetched from a paginated endpoint, produce one list deduplicated by `id`, keeping the most recently updated copy, sorted by `id`.\n\nExample: page 1 `[{id: 7, updatedAt: 3}, {id: 2, updatedAt: 1}]`, page 2 `[{id: 7, updatedAt: 9}]` gives `[{id: 2, updatedAt: 1}, {id: 7, updatedAt: 9}]`.\n\n## Constraints\n- Up to 10^5 records per problem; an O(n log n) solution is fine, O(n^2) will time out.\n- Any language on the platform; most candidates use JavaScript or Python.\n\n## What they look for\nCorrect handling of edge cases (empty input, k larger than the number of customers, all orders cancelled) and code that reads cleanly. Nobody expects clever tricks at this stage.",
  "follow_ups_md": "- What if the orders arrive as a stream and you cannot hold them all in memory?\n- How would you change the dedupe step if `updatedAt` could be equal for two copies?",
  "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."
}

Navigate (pre-filled links you can follow)