要拿offer丶mata川
要拿offer丶mata川
全部文章
分类
题解(2)
归档
标签
去牛客网
登录
/
注册
要拿offer丶mata川的博客
全部文章
(共2篇)
补充一下求中点和翻转对比的代码
public boolean isPail (ListNode head) { ListNode pre = head, cur = head; //求中点并进行反转后对比 while (cur != null && cur.next ...
算法
2020-10-24
0
476
朴素的中心扩展想法
很朴素的中心扩展想法,根据字符串的长度不同来确定不同的左右指针。详见注解,时间为O(S),空间O(1),其中S是字符串长度。 public boolean judge (String str) { int left = 0, right = 0; //根据长度的奇偶性来确定不同的指针...
2020-10-23
1
735