LTIMindtree interview question

Reverse a string using streams