Print String Characters in Reverse
EasyP3Coding
Return the characters of s as an array of one-character strings, starting from the last character and ending with the first (one line per character, as if printed in reverse).
Example 1
- Input
- s = "abc"
- Output
- ["c","b","a"]
Example 2
- Input
- s = ""
- Output
- []
Example 3
- Input
- s = "a"
- Output
- ["a"]
Constraints
- 0 <= s.length <= 10^5
Hints
Give it a real attempt first. Run shows which examples fail.
Saved automatically
Run checks the 3 visible tests, Submit all 10. ⌘Enter runs, ⌘⇧Enter submits.