Robinhood interview question

Book with multiple endings and paths