SDET Java Program 05: Reverse a string without affecting special characters or Spaces

preview_player
Показать описание
Simple Solution:
1) Create a temporary character array say temp[].
2) Copy alphabetic characters from the given array to chararr[].
3) Reverse chararr[] using standard string reversal algorithm.
4) Now traverse input string and temp in a single loop. Wherever there is an alphabetic character is input string, replace it with the current character of chararr[].
Efficient Solution:
Time complexity of the above solution is O(n), but it requires extra space, and it does two traversals of an input string.

The example contains:-
Q1.
Input- "abc! ssaaDs, asda%"
Output- "ads! asDaas, scba%"

Keywords:-
Reverse a string without affecting special characters
Reverse a string without affecting spaces
Reverse a String Retaining its Space Position
Reverse String Java program without impacting special character position.
Reverse a string without affecting special characters in java||special character reverse नहीं करना.
REVERSE STRING WITHOUT REMOVING SPECIAL CHARACTERS FROM IT'S ORIGINAL
java program to reverse a given string with preserving the position of spaces
reverse each words in string,
reverse each words in string bash,
reverse each words in string bracelets,
reverse each words in string blender,
b reverse each words in strings,
c reverse each words in strings,
reverse each words in string digital,
reverse each words in string diagram,
d reverse each words in strings,
reverse each words in string excel,
reverse each words in string example,
Рекомендации по теме
Комментарии
Автор

increase the front size its very small

Kalaiarasan_Balu