Yes we do brain-teasers, especially asking questions which are sometimes quite ambiguous, deliberately.
The point is not to get to the super optimal O(1) solution in a few seconds - in fact, I would question if anyone could do that withing breaking a sweat that he might have encountered the question before...but to watch how he responses, process the information, communication skill to get the requirement and question clear, explaining the train of thought on the way, all those little interactions. If writing code is needed, I would just tell them not to care too much how to make a API call because I would lookup Google^wMSDN for that too.
Getting the answer correctly is a bonus, of course you can't fail too much...but we are more focus to hire someone who can make sense, able to learn on the job, passionate about the job...hardcore skills are really not that important for entry level, I don't really care if you can or cannot prove P=NP, we are not in the research department.