Bachelor's and Master's in CS from MIT. Previously, worked @ Microsoft & Zynga. Currently Co-Founder of Moesif (moesif.com), the most advanced API analytics platform.
I am not sure about legal situation in other countries. but in US, definitely a company can not use code produced by interviewee (or anybody) unless it is paid for with contract/license stated, (with exception of open source software with permissive licenses that allow you do so.). If a company does that, it definitely will be subject to lawsuits, labor laws, etc. It is possible, the interview tasks assigned are completely unrelated to the company does for that specific reason.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I am not sure about legal situation in other countries. but in US, definitely a company can not use code produced by interviewee (or anybody) unless it is paid for with contract/license stated, (with exception of open source software with permissive licenses that allow you do so.). If a company does that, it definitely will be subject to lawsuits, labor laws, etc. It is possible, the interview tasks assigned are completely unrelated to the company does for that specific reason.