The opportunity cost is the most frustrating aspect. I've solved several "sample" problems from companies, and been involved in full day interviews writing code on the whiteboard. The worse was spending a day writing some sample code, then doing a panel interview where I was asked to make a change to the code to cover a non-sensical edge case. I was rejected because I "hesitated".