论文写完,开始做点题。
leetcode 326. Power of Three(不用循环或递归)
https://leetcode.com/discuss/78532/summary-all-solutions-new-method-included-at-15-30pm-jan-8th
确实是 it is about math, 没做之前不会知道,会有这么个ound off error 3^5=243
Linked List Cycle I
Linked List Cycle II
不用额外的空间,一开始也是不好想的。需要点公式推算。
设置快慢指针,有环则必然相遇。
和之前的一个题目一样,求一个链表的倒数第n个,也是不同额外空间。设置两个指针