摘要: class Solution { public ListNode reverseList(ListNode head) { ListNode pre=null; ListNode cur=head; ListNode temp=null; while(cur!=null) { temp=cur.ne 阅读全文
posted @ 2021-11-29 20:44 一刹流云散 阅读(6) 评论(0) 推荐(0) 编辑
摘要: class Solution { public boolean repeatedSubstringPattern(String s) { if (s.equals("")) return false; int len = s.length(); s = " " + s; char[] chars = 阅读全文
posted @ 2021-11-29 20:43 一刹流云散 阅读(4) 评论(0) 推荐(0) 编辑
摘要: class Solution { public String reverseWords(String s) { StringBuilder sb=removeSpace(s); reverse(sb,0,sb.length()-1); reverseEach(sb); return sb.toStr 阅读全文
posted @ 2021-11-29 20:42 一刹流云散 阅读(10) 评论(0) 推荐(0) 编辑