menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

You are gi...
source image

Prodevelopertutorial

1w

read

127

img
dot

You are given a sentence, reverse the string word by word

  • The given sentence is "prodevelopertutorial is a good website".
  • The solution to reverse the string word by word is as follows:
  • 1. Reverse the whole string.
  • 2. Reverse individual words in the string.
  • Remove leading and trailing spaces, and any extra spaces between words.
  • The reversed string word by word is "website good a is prodevelopertutorial".

Read Full Article

like

7 Likes

For uninterrupted reading, download the app