摘要: #题目简述:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the near... 阅读全文
posted @ 2015-03-29 21:04 mrbean 阅读(265) 评论(0) 推荐(0) 编辑
摘要: #题目简述: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 equals the given ... 阅读全文
posted @ 2015-03-29 20:46 mrbean 阅读(191) 评论(0) 推荐(0) 编辑
摘要: #题目简述: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 your algorithm t... 阅读全文
posted @ 2015-03-29 20:11 mrbean 阅读(211) 评论(0) 推荐(0) 编辑
摘要: #题目简述:Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. ... 阅读全文
posted @ 2015-03-29 19:49 mrbean 阅读(198) 评论(0) 推荐(0) 编辑
摘要: #题目简述:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal... 阅读全文
posted @ 2015-03-29 19:06 mrbean 阅读(218) 评论(0) 推荐(0) 编辑
摘要: #题目简述:Write a function to find the longest common prefix string amongst an array of strings.#解题思路: class Solution: # @return a string ... 阅读全文
posted @ 2015-03-29 18:51 mrbean 阅读(199) 评论(0) 推荐(0) 编辑