Paycom interview question

binary tree reverse the string duplicates words finding