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) 编辑

导航