Prepping for the 2027 recruiting cycle? Use code 2027RC for 10% off, valid until July 31st! Oh, and check out our members-only recruitment services.

Logo

Coding preview

Unknown captains and strange flight logs

What this preview is

About this preview

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

Unlock full access to getcracked

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

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