2015年12月2日

摘要: TriangleGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.ExampleFor example... 阅读全文
posted @ 2015-12-02 16:06 一心一念 阅读(524) 评论(0) 推荐(0) 编辑
摘要: Subarray SumExampleGiven [-3, 1, 2, -3, 4], return [0, 2] or [1, 3].NoteThere is at least one subarray that it's sum equals to zero.public class Solut... 阅读全文
posted @ 2015-12-02 07:07 一心一念 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Unique Paths IIFollow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle an... 阅读全文
posted @ 2015-12-02 06:23 一心一念 阅读(118) 评论(0) 推荐(0) 编辑
摘要: You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb... 阅读全文
posted @ 2015-12-02 05:17 一心一念 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Minimum Path SumGiven amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along ... 阅读全文
posted @ 2015-12-02 03:45 一心一念 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.Example"A man, a plan, a canal: Panama" i... 阅读全文
posted @ 2015-12-02 02:40 一心一念 阅读(108) 评论(0) 推荐(0) 编辑

导航