摘要: 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 an... 阅读全文
posted @ 2014-10-16 06:12 Phoebe815 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about this?Here are som... 阅读全文
posted @ 2014-10-16 06:11 Phoebe815 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le... 阅读全文
posted @ 2014-10-16 05:03 Phoebe815 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity... 阅读全文
posted @ 2014-10-16 04:55 Phoebe815 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 2014/10/15Leetcode第一刷总算结束,时间拖太长了,希望第二遍能快一点,争取一个月能刷完第二遍??哈哈哈哈 阅读全文
posted @ 2014-10-16 04:41 Phoebe815 阅读(565) 评论(0) 推荐(0) 编辑
摘要: Given two words (startandend), and a dictionary, find all shortest transformation sequence(s) fromstarttoend, such that:Only one letter can be changed... 阅读全文
posted @ 2014-10-13 16:10 Phoebe815 阅读(151) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/rmn190/article/details/1492013String 字符串常量StringBuffer 字符串变量(线程安全)StringBuilder 字符串变量(非线程安全)简要的说, String 类型和 StringBuffer 类型的主要性能... 阅读全文
posted @ 2014-10-13 15:10 Phoebe815 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文
posted @ 2014-10-12 15:38 Phoebe815 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labeled uniq... 阅读全文
posted @ 2014-10-12 07:35 Phoebe815 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu... 阅读全文
posted @ 2014-10-11 14:11 Phoebe815 阅读(186) 评论(0) 推荐(0) 编辑