MetaDesign Solutions Interview Question

Reverse string without reversing special characters. str= ' abc$d@ef% ' The output should be: ' fed$c@ba% '