2015年12月2日

摘要: 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) 编辑

2015年12月1日

摘要: Valid ParenthesesGiven a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.ExampleThe brac... 阅读全文
posted @ 2015-12-01 06:52 一心一念 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Given a sorted (increasing order) array, Convert it to create a binary tree with minimal height.ExampleGiven [1,2,3,4,5,6,7], return 4 / \ 2 ... 阅读全文
posted @ 2015-12-01 05:42 一心一念 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Longest Increasing Continuous subsequenceGive you an integer array (index from 0 to n-1, where n is the size of this array),find the longest increasin... 阅读全文
posted @ 2015-12-01 05:14 一心一念 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Binary Tree PathsGiven a binary tree, return all root-to-leaf paths.ExampleGiven the following binary tree: 1 / \2 3 \ 5All root-to-leaf path... 阅读全文
posted @ 2015-12-01 03:54 一心一念 阅读(206) 评论(0) 推荐(0) 编辑
摘要: SubtreeYou have two every large binary trees: T1, with millions of nodes, and T2, with hundreds of nodes. Create an algorithm to decide if T2 is a sub... 阅读全文
posted @ 2015-12-01 03:52 一心一念 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Reverse digits of an integer. Returns 0 when the reversed integer overflows (signed 32-bit integer).ExampleGiven x = 123, return 321Given x = -123, re... 阅读全文
posted @ 2015-12-01 02:27 一心一念 阅读(135) 评论(0) 推荐(0) 编辑

2015年11月26日

摘要: Maximum SubarrayGiven an array of integers, find a contiguous subarray which has the largest sum.ExampleGiven the array [−2,2,−3,4,−1,2,1,−5,3], the c... 阅读全文
posted @ 2015-11-26 04:38 一心一念 阅读(107) 评论(0) 推荐(0) 编辑

导航