摘要: Problem Definition:Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as abinary tree ... 阅读全文
posted @ 2015-07-21 21:39 曾可爱 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Problem Definition:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node dow... 阅读全文
posted @ 2015-07-21 20:19 曾可爱 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Problem Definition:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equa... 阅读全文
posted @ 2015-07-21 20:17 曾可爱 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Problem Definition:Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3,3,1].Note:Could you optimize yo... 阅读全文
posted @ 2015-07-21 20:13 曾可爱 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Problem Definition:Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return[ [1], [1,1], [1,2,1]... 阅读全文
posted @ 2015-07-21 20:11 曾可爱 阅读(86) 评论(0) 推荐(0) 编辑
摘要: Problem Definition:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a... 阅读全文
posted @ 2015-07-21 11:33 曾可爱 阅读(97) 评论(0) 推荐(0) 编辑