Given a string containing multiple words, reverse the order of the words within the string.

AnswerBot
2y
Reverse all the words in a given string
Split the string into an array of words
Loop through the array and reverse each word
Join the reversed words back into a string

Sri Ram
5y
'''In Python'''
a=input('Enter a String :') #Give input as String
print('Reverse Word :',a[::-1]) #It prints the Reverse order
Avinash Verma
5y
everseStr(string& str)
or simply by coping it in another and assigning vales from last to first
Tien Phan Van
5y
javascript: string.split('').reverse().join('')
Add answer anonymously...
Amazon Software Developer interview questions & answers
A Software Developer was asked 1mo agoQ. Could you describe the process for designing a data structure that allows for al...read more
A Software Developer was asked 1mo agoQ. What is HTML?
A Software Developer was asked 1mo agoQ. What is MySQL?
Popular interview questions of Software Developer
A Software Developer was asked 1mo agoQ1. Could you describe the process for designing a data structure that allows for al...read more
A Software Developer was asked 1mo agoQ2. What is MySQL?
A Software Developer was asked 1mo agoQ3. What is Java?
Top HR questions asked in Amazon Software Developer
A Software Developer was asked 1mo agoQ1. Tell me about a time you had to get to the root cause of a problem
A Software Developer was asked 5mo agoQ2. What are the short-term and long-term goals for the team or organization?
A Software Developer was asked 5mo agoQ3. Why do you want to work at Amazon?
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

