摘要: 游标步长与循环不变量概念 阅读全文
posted @ 2024-08-09 18:51 ZeroPhix 阅读(18) 评论(0) 推荐(0)
摘要: 字符数组本质上还是数组,在数组上使用的方法技巧在字符数组上同样适用 阅读全文
posted @ 2024-08-09 17:46 ZeroPhix 阅读(18) 评论(0) 推荐(0)
摘要: 与Valid-Anagram类似 阅读全文
posted @ 2024-08-09 17:08 ZeroPhix 阅读(18) 评论(0) 推荐(0)
摘要: 大问题拆分为子问题,使用了对称的思想,再利用边界条件,降低自由变量的个数,与Two Sum完全可以类比 阅读全文
posted @ 2024-08-09 16:56 ZeroPhix 阅读(24) 评论(0) 推荐(0)
摘要: 分析 Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each 阅读全文
posted @ 2024-08-09 15:29 ZeroPhix 阅读(22) 评论(0) 推荐(0)
摘要: 快乐数的检测过程实际上是一个寻找循环的过程,无论是1自身的循环,还是在有限空间内的循环 阅读全文
posted @ 2024-08-09 13:24 ZeroPhix 阅读(45) 评论(0) 推荐(0)
摘要: 双指针方式,本质是遍历,遍历过程将问题一分为二,拆分为已解决和未解决的问题 阅读全文
posted @ 2024-08-09 11:33 ZeroPhix 阅读(23) 评论(0) 推荐(0)
摘要: Valid-Anagram:a word or phrase that is made by changing the order of the letters in another word or phrase 阅读全文
posted @ 2024-08-05 13:50 ZeroPhix 阅读(18) 评论(0) 推荐(0)
摘要: 环形链表与链表相交可以结合起来思考,环形链表的环入口可以看做是特殊形式的中间结点, 也可利用地址唯一性引入哈希法 阅读全文
posted @ 2024-08-04 16:27 ZeroPhix 阅读(23) 评论(0) 推荐(0)
摘要: 相交链表转换成相遇问题,当两者不相交解决无限循环的问题,就在于双指针全部遍历后,又重新从对方的链表开始无限循环遍历 阅读全文
posted @ 2024-08-03 20:25 ZeroPhix 阅读(21) 评论(0) 推荐(0)