• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
September 30, 2024 |30 Views

PROBLEM OF THE DAY : 19/09/2024 | Reverse Words

Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Saurabh Bansal We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of String but also build up problem-solving skills.

Given a String str, reverse the string without reversing its individual words. Words are separated by dots.

Note: The last character has not been '.'. 

Examples :

Input: str = i.like.this.program.very.much Output: much.very.program.this.like.i Explanation: After reversing the whole string(not individual words), the input string becomes much.very.program.this.like.i

Give the problem a try before going through the video. All the best!!!
Problem Link: https://practice.geeksforgeeks.org/problems/reverse-words-in-a-given-string5459/1