How to Reverse a String
The only way to get better at solving algorithms and data structures is to power through a few
Published in
5 min readAug 19, 2020
Can you write a function that reverses an inputted string without using the built-in Array#reverse
method?
Let’s look at some examples. So, calling:
reverseString("jake")
should return "ekaj"
.
reverseString("reverseastring")
should return "gnirtsaesrever"
.
This lesson was originally published at https://algodaily.com, where I maintain a technical interview course and write think-pieces for ambitious developers.
True or False?
In Java, C#, JavaScript, Python and Go, strings are immutable
. This means the string object's state can't be changed after creation.
Solution: True