Factweavers interview question

String reversal array function and its output