It was asked to me in Amazon interview. Its a very good interview question