摘要: 228 · Middle of Linked List 快慢指针 慢走1, 快每次走2 初始化的时候 slow = head; fast =head.next; 并且 while的时候 java是从左到右检查 while(last!=null && last.next!=null) 如果写成 whi 阅读全文
posted @ 2022-07-17 09:26 奋斗中的菲比 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 旋转数组: 1790 · Rotate String II: 这里需要注意的是substring的 indexstart :inclusive, indexend: exclusive 2.offset need to be modulo int offset = (left - right) % 阅读全文
posted @ 2022-07-17 07:59 奋斗中的菲比 阅读(22) 评论(0) 推荐(0) 编辑