Tandym Group interview question

*find longest substring in a string *reverse string words