You are given a string s consisting of lowercase English letters and special characters.
Your task is to perform these in order:
Return the resulting string after performing the reversals.
Example 1:
Input: s = ")ebc#da@f("
Output: "(fad@cb#e)"
Explanation:
['e', 'b', 'c', 'd', 'a', 'f']:
['f', 'a', 'd', 'c', 'b', 'e']s becomes ")fad#cb@e("[')', '#', '@', '(']:
['(', '@', '#', ')']s becomes "(fad@cb#e)"Example 2:
Input: s = "z"
Output: "z"
Explanation:
The string contains only one letter, and reversing it does not change the string. There are no special characters.
Example 3:
Input: s = "!@#$%^&*()"
Output: ")(*&^%$#@!"
Explanation:
The string contains no letters. The string contains all special characters, so reversing the special characters reverses the whole string.
Constraints:
1 <= s.length <= 100s consists only of lowercase English letters and the special characters in "!@#$%^&*()".