Alarm.com interview question

Reverse a string