I wonder how the copyright situation would be if you were to write code during your interview that they continue to use. That's before any sort of contract that details what rights the company has to your work (since they cannot take your copyright they usually reserve all other ways of using it). So technically that's still your work and you have full rights to it.