Questions tagged [reverse]

Rearranging the order of a sequence such that the final order is a mirror image of the original.

Rearranging the order of a sequence such that the final order is a mirror image of the original.

3773 questions
1
vote
4 answers

Make 2 digit number to a 3 digit number and reverse it

99 to 099 and reverse it = 990 This is my code but it's not changing the number. Why? int number = 99; String strI = String.format("%03d", number); new StringBuilder(strI).reverse().toString(); number = Integer.parseInt(strI); return number;
Smith
  • 31
  • 1
  • 6
1
vote
5 answers

Reversing words in a string JS without using built in function

Without using the split reverse and join functions, how would one do such a thing? The Problem Given: Reverse the words in a string Sample Input: "Hello World" Sample Output: "World Hello"