public class Solution{
public String rePlaceSpace(Strin
g s)
{int length=s.length*3;
Char str=new char[];
for(int i=0;i<s.length;i++){
if(s.charAt(i)=’ ‘){
str[i++]=’%';
str[i++]=‘2’;
str[i++]=‘0’;
}else{str[i++]=s.charAt(i);
}}
int newStr=new char(str,0,size);return newStr;
}
}
public class Solution{
ArrayList list=new Arraylist<>();
public ArrayList printHeadtoTail(Listnode listnode);
{if(listnode.next!=null){
printTailtoHead(listnode.next);
}list.add(listnode.val);
return list;
}
}
复习1 ==
最新推荐文章于 2024-06-21 12:29:22 发布