题目:An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with ...
分类:
其他好文 时间:
2015-04-12 16:06:42
阅读次数:
107
Problem:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a tar...
分类:
其他好文 时间:
2015-04-09 21:24:07
阅读次数:
97
Follow up for “Find Minimum in Rotated Sorted Array”:
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Suppose a sorted array is rotated at some pivot...
分类:
其他好文 时间:
2015-04-09 19:49:17
阅读次数:
115
Problem Description
Suppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these coins for a given amount of money.
For example, if we have 11 cents, then we can make changes with one 10-cent coin a...
分类:
其他好文 时间:
2015-04-08 16:35:21
阅读次数:
132
题目:
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4
5 6 7 0 1 2).
You are given a target value to search. If found in the ar...
分类:
其他好文 时间:
2015-04-07 17:42:36
阅读次数:
161
blockhouses
时间限制:1000 ms | 内存限制:65535 KB
难度:3
描述Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing ...
分类:
其他好文 时间:
2015-04-06 15:45:43
阅读次数:
165
{\bf Question 2:\ }Suppose that $X$ has density function\[f_\theta(x) = \frac{x^{\theta-1} e^{-x}}{\Gamma(\theta)} I \{ x>0\}.\]Find expressions for t...
分类:
其他好文 时间:
2015-04-01 17:24:12
阅读次数:
118
题目:
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.You may assume no duplicate exists in the array....
分类:
其他好文 时间:
2015-03-30 11:22:35
阅读次数:
99
Find Minimum in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4
5 6 7 0 1 2).
Find the minimum element....
分类:
其他好文 时间:
2015-03-29 12:19:27
阅读次数:
160
点击打开链接
Grouping
Time Limit: 2 Seconds Memory Limit: 65536 KB
Suppose there are N people in ZJU, whose ages are unknown. We have some messages about them. The i-th message shows that th...
分类:
其他好文 时间:
2015-03-21 18:41:36
阅读次数:
154