摘要: Problem Definition: Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9 to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This pr... 阅读全文
posted @ 2015-07-16 12:20 曾可爱 阅读(93) 评论(0) 推荐(0)
摘要: Problem Definition: Given a sorted integer array without duplicates, return the summary of its ranges. For example, given [0,1,2,4,5,7], return ["0-... 阅读全文
posted @ 2015-07-16 11:45 曾可爱 阅读(163) 评论(0) 推荐(0)
摘要: Problem Definition: Given an integer, write a function to determine if it is a power of two.Solution:class Solution: # @param {integer} n # @re... 阅读全文
posted @ 2015-07-15 21:12 曾可爱 阅读(127) 评论(0) 推荐(0)