01 2021 档案
摘要:The basic task is simple: given N real numbers, you are supposed to calculate their average. But what makes it complicated is that some of the input n
阅读全文
摘要:This time your job is to fill a sequence of N positive integers into a spiral matrix in non-increasing order. A spiral matrix is filled in from the fi
阅读全文
摘要:Given a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For example, given the sequence { 0.1, 0.2, 0.3, 0.4 }, we
阅读全文
摘要:Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals
阅读全文
摘要:Given a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M≤m×p where M and m are the max
阅读全文
摘要:With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas s
阅读全文
摘要:Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1 = { 11, 12, 13, 14 } is 1
阅读全文
摘要:A long-distance telephone company charges its customers by the following rules: Making a long-distance call costs a certain amount per minute, dependi
阅读全文
摘要:Given a syntax tree (binary), you are supposed to output the corresponding infix expression, with parentheses reflecting the precedences of the operat
阅读全文

浙公网安备 33010602011771号