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

The lazy ahh student

What this preview is

The lazy ahh student is a medium quant coding problem on language knowledge in Cpp.

Difficulty
Medium
Topic
Language Knowledge
Discipline
Quant development
Language
Cpp

Solving this medium C++ routing optimization problem

This is a medium-difficulty coding problem that tests your ability to find an optimal tour through a small set of waypoints. The constraint that you must visit every location exactly once, combined with a small upper bound on the number of tasks, hints at a brute-force or dynamic-programming approach rather than a greedy heuristic.

The core challenge is exploring the solution space efficiently: with up to 8 tasks, the number of possible orderings is manageable, but you need to compute Euclidean distances accurately and compare routes systematically. A well-structured solution will clearly separate the distance calculation, permutation generation, and aggregation logic, making it easy to verify correctness on edge cases like empty task lists or collinear points.

  • Permutation enumeration and backtracking
  • Floating-point arithmetic and distance computation
  • State-space search with manageable branching factor
  • Handling boundary conditions (no tasks, start equals end)

Unlock full access to getcracked

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