Implement a function to reverse the words in a string.
MediumProblem Statement
Implement a function to reverse the words in a string.
Sample Input
"Java is fun"
Sample Output
fun is Java
Limits
Time: 2s · Memory: 256 MB
Implement a function to reverse the words in a string.
"Java is fun"
fun is Java
Time: 2s · Memory: 256 MB