LineVision interview question

Given an undocumented and inefficient legacy python function in an online code-pad, perform a code review and refactor the code (~15m)

Interview Answer

Anonymous

6 Jan 2026

Refactored mostly in pseudo-code due to time, describing my thought process as I went.