摘要:
Given an integer array (index from 0 to n-1, where n is the size of this array), and an query list. Each query has two integers [start, end]. For each 阅读全文
posted @ 2016-02-01 12:30
neverlandly
阅读(701)
评论(0)
推荐(0)
摘要:
For an array, we can build a SegmentTree for it, each node stores an extra attribute count to denote the number of elements in the the array which val 阅读全文
posted @ 2016-02-01 11:46
neverlandly
阅读(599)
评论(0)
推荐(0)
摘要:
For a Maximum Segment Tree, which each node has an extra value max to store the maximum value in this node's interval. Implement a modify function wit 阅读全文
posted @ 2016-02-01 08:05
neverlandly
阅读(313)
评论(0)
推荐(0)
摘要:
For an integer array (index from 0 to n-1, where n is the size of this array), in the corresponding SegmentTree, each node stores an extra attribute m 阅读全文
posted @ 2016-02-01 07:52
neverlandly
阅读(814)
评论(0)
推荐(0)
摘要:
One way to serialize a binary tree is to use pre-oder traversal. When we encounter a non-null node, we record the node's value. If it is a null node, 阅读全文
posted @ 2016-02-01 07:31
neverlandly
阅读(1174)
评论(0)
推荐(0)
摘要:
The structure of Segment Tree is a binary tree which each node has two attributes start and end denote an segment / interval. start and end are both i 阅读全文
posted @ 2016-02-01 06:41
neverlandly
阅读(304)
评论(0)
推荐(0)
摘要:
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in ZigZag-order. Have you met this question in a real intervie 阅读全文
posted @ 2016-02-01 05:24
neverlandly
阅读(656)
评论(0)
推荐(0)
浙公网安备 33010602011771号