Some coding problems from Amazon# JobHunting - 待字闺中
p*p
1 楼
不是面经,只是讨论一下
1. sort a doubly linked list (say, LinkedList in Java)
2. find the next bigger integer (e.g. 5436->5463)
此题肯定有很多质疑,但是只要列出合理的,你认为需要的assumption都可以
3. create a binary tree from the sums of an array
例子(底层数量一定是2的幂):
3 -5 4 -6
结果
-4
-2 -2
3 -5 4 -6
(就是两两求和)
1. sort a doubly linked list (say, LinkedList in Java)
2. find the next bigger integer (e.g. 5436->5463)
此题肯定有很多质疑,但是只要列出合理的,你认为需要的assumption都可以
3. create a binary tree from the sums of an array
例子(底层数量一定是2的幂):
3 -5 4 -6
结果
-4
-2 -2
3 -5 4 -6
(就是两两求和)