Arista Networks interview question

reverse a string, BST