摘要:
思路: 快慢指针,间隔n+1,当fast为None时,断掉slow.next:slow.next = slow.next.next。 阅读全文
posted @ 2020-05-09 13:46
人间烟火地三鲜
阅读(151)
评论(0)
推荐(0)
摘要:
方法一思路: 用现有节点存放结果(用l1存的,l1短则把l2的多余节点拼到l1上)。 方法二思路: 新建链表来存放结果。 阅读全文
posted @ 2020-05-09 13:41
人间烟火地三鲜
阅读(165)
评论(0)
推荐(0)
摘要:
[toc] “ // ”运算:取整时保留整数的下界; 示例: \ 5//3 1 \ 5//3 2 int() 函数:是剪去小数部分,只保留前面的整数,即向零取整; 示例: \ int(5.3) 5 \ int(5.6) 5 round() 函数:遵循四舍五入的法则; 示例: \ round(5.3) 阅读全文
posted @ 2020-05-09 13:33
人间烟火地三鲜
阅读(1794)
评论(0)
推荐(0)
摘要:
[toc] 定义 定义节点:数据域、指针域 head指针指向的是第一个节点。 定义单链表,及操作: python mylist = Node() mylist.next = head python node.next = head.next head.next = node python while 阅读全文
posted @ 2020-05-09 13:23
人间烟火地三鲜
阅读(294)
评论(0)
推荐(0)

浙公网安备 33010602011771号