Here is a 2-minute whiteboard video explaining our solution: