![]() |
Write a program to reverse a sentence. Examples:
Approach: To solve the problem, follow the below idea:
Step-by-step algorithm:
Below is the implementation of the algorithm: C++
C
Java
Python3
C#
Javascript
Output
GFG htiw ecitcarP Time Complexity: O(N), where N is the length of the sentence. |
Reffered: https://www.geeksforgeeks.org
Programming |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 14 |