摘要:
Description 已知两个长度为N的数组A和B。下标从0标号至N-1。 如今定义一种D序列 (如果长度为L)。这样的序列满足下列条件: 1. 0 <= D[i] <= N-1 2. A[D[i]] < A[D[i+1]] (0 <= i < L-1) 3. B[D[i]] > B[D[i+1] 阅读全文
posted @ 2017-06-09 10:25
yfceshi
阅读(217)
评论(0)
推荐(0)
摘要:
欢迎关注我的新博客地址:http://cuipengfei.me/ Lower bound。不知道这个词的确切中文翻译是如何的。我们直接看样例吧。 1 2 3 class Pair[T](val first: T, val second: T) { def replaceFirst[R >: T]( 阅读全文
posted @ 2017-06-09 09:41
yfceshi
阅读(204)
评论(0)
推荐(0)
摘要:
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2017-06-09 08:21
yfceshi
阅读(120)
评论(0)
推荐(0)

浙公网安备 33010602011771号