Код: Выделить всё
class Solution {
static String revStr(String s) {
String ans = "";
for(int i = s.length()-1; i >= 0; i--) {
ans += s.charAt(i);
}
return ans;
}
}
Подробнее здесь: https://stackoverflow.com/questions/787 ... of-my-code
Код: Выделить всё
class Solution {
static String revStr(String s) {
String ans = "";
for(int i = s.length()-1; i >= 0; i--) {
ans += s.charAt(i);
}
return ans;
}
}