We use optional cookies for analytics and affiliate attribution. Essential cookies and marketing measurement are always on. Read our privacy policy

We just launched our Black Friday sale. You can use code BF2026 to get 25% off all subscriptions, valid until Nov 30th. There is a limit of 100 redemptions.

Logo

Unknown captains and strange flight logs

What this preview is

Unknown captains and strange flight logs is a medium quant coding problem on language knowledge in Cpp.

Difficulty
Medium
Topic
Language Knowledge
Discipline
Quant development
Language
Cpp

Parsing alien numerals and sorting by custom keys in C++

This medium-difficulty coding problem tests your ability to parse a custom numeral system, implement a comparison function with multiple sort criteria, and handle edge cases in string manipulation. It is representative of problems used to evaluate practical coding skill and attention to specification detail.

The core challenge is twofold: first, reliably extract and decode the Sylvhi glyph-numeral that sits at the end of each call-sign (after the final space), applying the subtractive rule whenever a lower-value glyph precedes a higher-value one. Second, implement a stable comparator that sorts primarily by decoded numeral value, then lexicographically by the full call-sign string when values tie. A clean solution isolates the parsing logic, handles the glyph-value map clearly, and uses the standard library's sort with a well-defined comparison predicate.

  • Custom numeral system decoding with conditional sign rules
  • String tokenization and extraction
  • Multi-key sorting and tie-breaking
  • Comparator design for std::sort

Unlock full access to getcracked

Join to unlock this problem, detailed solutions, and our complete library of quant finance interview prep.