摘要: Problem Description:Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) ... 阅读全文
posted @ 2015-06-12 22:00 jianchao-li 阅读(250) 评论(0) 推荐(0) 编辑
摘要: Problem Description:Given a string, find the length of the longest substring T that contains at most 2 distinct characters.For example, Given s =“eceb... 阅读全文
posted @ 2015-06-12 20:44 jianchao-li 阅读(304) 评论(0) 推荐(0) 编辑
摘要: After reading the quote below the problem, you will be motivated to solve it immediately :-) Well, indeed it is also relative easy. The process of inv... 阅读全文
posted @ 2015-06-12 17:01 jianchao-li 阅读(349) 评论(0) 推荐(0) 编辑
摘要: This problem is not very intuitive at first glance. However, the final idea should be very self-explanatory. You visit each element in nums, and then ... 阅读全文
posted @ 2015-06-12 16:40 jianchao-li 阅读(194) 评论(0) 推荐(0) 编辑