Refactor a Correct but Quadratic C++ Routine Under a Microsecond Budget
Company: Citadel
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Online Assessment
Overview: Refactor a correct C++ routine from repeated quadratic scans toward linear time while preserving exact behavior. The discussion covers profiling, one-pass indexing, algebraic replacements for costly math, copy avoidance, differential testing, and a reproducible 100-microsecond benchmark.
Read the full Citadel Software Engineer interview experience this question came from