Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these N numbers successfully if one of t ...
分类:
其他好文 时间:
2018-01-25 00:17:34
阅读次数:
151
PAT 1020. Tree Traversals Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequenc ...
分类:
其他好文 时间:
2018-01-08 14:49:58
阅读次数:
109
PAT 1017. Queueing at Bank Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting are ...
分类:
其他好文 时间:
2018-01-07 14:22:40
阅读次数:
157
Suppose an array sorted in ascending order 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 a ...
分类:
其他好文 时间:
2018-01-05 22:32:46
阅读次数:
213
Given an array A (index starts at 1) consisting of N integers: A1, A2, ..., AN and an integer B. The integer Bdenotes that from any place (suppose the ...
分类:
其他好文 时间:
2018-01-03 15:47:31
阅读次数:
180
Hashing Hard Version Given a hash table of size N, we can define a hash function . Suppose that the linear probing is used to solve collisions, we can ...
分类:
其他好文 时间:
2018-01-01 19:29:57
阅读次数:
176
/***********************************************************************33. Search in Rotated Sorted Array Suppose an array sorted in ascending order ...
分类:
编程语言 时间:
2017-12-27 11:54:40
阅读次数:
131
Suppose that all the keys in a binary tree are distinct positive integers. Given the preorder and inorder traversal sequences, you are supposed to out ...
分类:
其他好文 时间:
2017-12-23 17:12:36
阅读次数:
159
03-树3 Tree Traversals Again(25 分) An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that w ...
分类:
其他好文 时间:
2017-12-18 12:34:44
阅读次数:
238
code 不难,multi dimension array 的求 summation。 之前准备地里的LinkedIn高频题一个没碰到。。。 /** Suppose you are given a class that implements a k-dimensional array * inter... ...
分类:
其他好文 时间:
2017-12-03 11:36:28
阅读次数:
196