Amazon interview question

invert binary tree, and BQ