lintcode
文章平均质量分 79
oldsui
这个作者很懒,什么都没留下…
展开
-
20150624 lintcode 总结 Validate Binary Search Tree
Validate Binary Search Tree 题目:http://www.lintcode.com/en/problem/validate-binary-search-tree/ Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is de原创 2015-06-24 00:11:56 · 568 阅读 · 0 评论 -
Maximum Subarray Difference Solution
这道题感觉非常有意思,值得记录一下。思路来源:https://codesolutiony.wordpress.com/2015/05/28/lintcode-maximum-subarray-difference/ public class Solution { /** * @param nums: A list of integers * @return:原创 2015-10-22 17:39:35 · 354 阅读 · 0 评论 -
20150707 lintcode 总结 Search Range in Binary Search Tree
Given two values k1 and k2 (where k1 Example If k1 = 10 and k2 = 22, then your function should return [12, 20, 22]. 20 / \ 8 22 / \ 4 12 /** * Definition of TreeNo原创 2015-07-07 12:02:42 · 525 阅读 · 0 评论 -
20150708 lintcode 总结 Binary Tree Maximum Path Sum Show result *****
Medium Binary Tree Maximum Path Sum Show result 23% Accepted Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. Example: Given th原创 2015-07-08 16:23:48 · 448 阅读 · 0 评论 -
20150708 lintcode 总结 Minimum Path Sum
Easy Minimum Path Sum Show result 34% Accepted Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numb原创 2015-07-08 15:09:06 · 407 阅读 · 0 评论 -
20150708 lintcode 总结 Binary Search Tree Iterator
Binary Search Tree Iterator Design an iterator over a binary search tree with the following rules: Elements are visited in ascending order (i.e. an in-order traversal)next() and hasNext(原创 2015-07-08 11:09:18 · 651 阅读 · 0 评论 -
20150624 lintcode 总结 binary-tree-level-order-traversal **
Binary Tree Level Order Traversal http://www.lintcode.com/problem/binary-tree-level-order-traversal Given a binary tree, return the level order traversal of its nodes' values. (ie, from原创 2015-06-24 23:59:50 · 370 阅读 · 0 评论 -
20150624 lintcode 总结 Lowest Common Ancestor
Lowest Common Ancestor http://www.lintcode.com/problem/lowest-common-ancestor Given the root and two nodes in a Binary Tree. Find the lowest common ancestor(LCA) of the two nodes. T原创 2015-06-24 23:00:22 · 431 阅读 · 0 评论 -
20150624 lintcode 总结 Balanced Binary Tree
判断是否为balanced binary tree: http://www.lintcode.com/en/problem/balanced-binary-tree/ Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is原创 2015-06-24 13:31:22 · 546 阅读 · 0 评论 -
Maximum Subarray III
Given an array of integers and a number k, find k non-overlapping subarrays which have the largest sum. The number in each subarray should be contiguous. Example Given [-1,4,-2,3,-2,3], k原创 2015-11-11 14:47:00 · 493 阅读 · 0 评论