Paycom Interview Question

binary tree reverse the string duplicates words finding