DEV Community

Discussion on: Day-15 Reverse words in a string

Collapse
 
mridubhatnagar profile image
Mridu Bhatnagar

There can be multiple ways to solve a given problem.

I have updated the code. And, now all edge cases are being taken care of. Leading spaces, trailing spaces, multiple spaces. Built-in method reverse() is replaced by implementation of reverse().