Write the pseudocode to reverse a string
Anonym
In response to Harry's comment, I have an answer for that :) String s = "hello my name is zach galefernachus"; String temp = s.substring(s.lastIndexOf(" ")+1); s = " " +s+ " "; for(int i = s.length()-2; i>=0; i--){ if(s.substring(i, i+1).equals(" ")){ temp += s.substring(i, s.indexOf(" ", i+1)); } } return temp;