I didn't expect brain teasers in the interview, so when I got the first one to solve, I was quite surprised, since that was the very first part of the interview after very short greeting from the recruiter. It was not that hard, but I didn't get the best answer in time. I feel I did not bad in the second part, so I guess this brain teaser was the reason I didn't enter the next round.