Online Assessment
Optimizing a Correct C++ Function to Run Under 100 Microseconds
CitadelSoftware Engineer · Online Assessment · Aug 2026
The assessment provided C++ source code for a root_node function. Its logic was correct, but it ran extremely slowly. The task was to refactor and optimize it so that it would finish in strictly less than 100 microseconds on large inputs. The original code contained nested loops and operations such as std::find_if and std::advance, producing O(N²) complexity. I needed to reduce that to O(N). It a…
Shared by a candidate · reported Aug 2026. Interview formats change; use it as a guide, not a script.