Walk me through a logical puzzle or an algorithmic problem you solved recently, and what your step-by-step approach was.