Amazon Interview Question | Hanging Cable Problem | Can you solve it?