Reverse the String You are given a string 'STR'. The string contains [a-z] [A-Z] [0-9] [special characters]. You have to find the reverse of the string. For example: If the given string is: STR = "abcde". You have to print the string "edcba". follow up: Try to solve the problem in O(1) spac...

read more
CodingNinjas
author
2y
Slicing can be used to reverse a string in python. To reverse a string, we simply create a slice that starts with the length of the string, and ends at index 0.To reverse a string using slicing, ...
see more
CodingNinjas
author
2y
Optimal SolutionTraverse the string and swap the first character with the last character, the second character with the second last character and so on.Basically, you need to swap the i-th character w...
see more
Help your peers!
Add answer anonymously...
VMware Software Devops Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2023 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter