That’s not cheating, that’s not a problem at all. Neither ethical nor otherwise.
You happened to know a working solution, this was by chance, but you also managed to sell it, explain it and it’s a solution you developped.
And the fact that the poster did well on the full-day follow up at Redmond and was invited to join either of the teams he interviewed with means that he was certainly qualified to pass the on-campus interview.