an issue in the code of -Reverse words in a given string
Opened this issue · 0 comments
iamutkarshyadav commented
The code you've provided is not correctly reversing the words in a given string. It appears to be reversing the entire input string Str, which would reverse the order of all characters in the string without considering word boundaries.
To reverse the words in a string, you need to split the string into individual words, reverse each word, and then join them back together. Here's a corrected version of the code: