Amazon interview question

Phone Interview#2: a) Check two binary trees are same. b) Design Java ArrayList