3823. Reverse Letters Then Special Characters in a String
You are given a string
sconsisting of lowercase English letters and special characters.Your task is to perform these in order:
- Reverse the lowercase letters and place them back into the positions originally occupied by letters.
- Reverse the special characters and place them back into the positions originally occupied by special characters.
Return the resulting string after performing the reversals.
1 | class Solution { |