Itens Sort
Reported by candidates from Akuna's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
Akuna hit you with 'Itens Sort' in September 2024, and it's exactly what it sounds like: a sorting problem dressed up in interview clothing. You've got a list of items and a rule for how they rank. The trick isn't the algorithm itself, you already know how to sort. The trick is figuring out what the comparator is, and whether there's a stable sort or tie-break rule hiding in the problem statement. StealthCoder will read the full prompt and surface the comparator pattern instantly if you blank on the logic.
Pattern and pitfall
Sorting problems at Akuna tend to layer complexity not in the algorithm but in the sort key. You're probably sorting by a custom property, or by multiple fields with a priority order, or by some derived metric. The pitfall is hardcoding the wrong comparator and getting 80% of test cases right. The hedge is to read the problem twice: once for the overall shape, once for every detail about how 'items' are ranked. Python's sorted() with a key function or a custom comparator works fast. If you freeze during the OA, StealthCoder will show you the exact comparator you need and handle edge cases like ties or null fields. Most candidates overthink this and miss a one-liner sort rule buried in the examples.
The honest play: practice the pattern, and have StealthCoder ready for the one you didn't see coming.
You can drill Itens Sort 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 StealthCoderRelated leaked OAs
You've seen the question.
Make sure you actually pass Akuna's OA.
Akuna 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.
Itens Sort FAQ
Is this a multi-key sort or single-key?+
You'll know from the problem examples. If items are sorted by one property, you're done in seconds. If two or more properties matter, use a tuple in your key function (Python) or chain comparisons. Akuna usually signals this in the examples, not the prose.
What's the most common pitfall on sorting problems at Akuna?+
Forgetting that the input may have duplicates or edge cases like empty lists, zero values, or special strings. Sort first, then validate. Also: don't assume ascending order. Always check the examples.
How do I prepare for this in 48 hours?+
You don't drill sorting. You read 3-4 Akuna sorting problems, identify the pattern in each example, and internalize the comparator logic. Spend 10 minutes per problem. Then go to bed. You know how to sort.
Will Akuna ask me to implement my own sort algorithm?+
No. Use the built-in sort (sorted() in Python, sort() in JavaScript). Akuna cares about the logic of the comparator, not your ability to code merge sort. They test correctness, not algorithmic reinvention.
What if the problem involves custom objects or nested fields?+
Extract the field you need in the key function, or use tuple unpacking for multi-field sorts. Handle null or missing fields before sorting. Test with the provided examples first.