You’ll get hit with a DMCA takedown notice if you do that.. most companies protect interview questions they ask and solutions to them quite severely.
Source: I once had a dragged out legal dispute with a company that used a GitHub DMCA takedown to tell me to remove a public repo in which I solved their takehome challenge (I had signed no NDA or otherwise any type of agreement of any kind prior to solving it).