摘要: 题目: Given a singly linked list, determine if it is a palindrome. Follow up:Could you do it in O(n) time and O(1) space? 链接: http://leetcode.com/proble 阅读全文
posted @ 2017-03-01 06:01 panini 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 题目: Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in f 阅读全文
posted @ 2017-03-01 05:28 panini 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an integer, write a function to determine if it is a power of two. 链接: http://leetcode.com/problems/power-of-two/ 2/28/2017 看别人的。看来要注意各种比特运算 阅读全文
posted @ 2017-03-01 04:36 panini 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 题目: Invert a binary tree. to Trivia:This problem was inspired by this original tweet by Max Howell: 链接: http://leetcode.com/problems/invert-binary-tre 阅读全文
posted @ 2017-03-01 04:26 panini 阅读(109) 评论(0) 推荐(0) 编辑