I wish all companies who ask their candidates to solve a coding exercise give honest feedback like this after the end of the interview. Most times its just the canned 'Sorry you are not a fit' or the response the OP got.
I think the best way to get feedback on a rejected code sample is to give your code to an objective third party and ask their opinion, like OP did here.