摘要: Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? 思路:使用两个指针slow,fast。两个指针都从表头开始走,一个slow一次前 阅读全文
posted @ 2017-10-11 23:23 im.lhc 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Invert a binary tree. to 阅读全文
posted @ 2017-10-11 19:25 im.lhc 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical a 阅读全文
posted @ 2017-10-11 17:26 im.lhc 阅读(90) 评论(0) 推荐(0) 编辑