1 """ 2 For example, given 3 preorder = [3,9,20,15,7] 4 inorder = [9,3,15,20,7] 5 Return the following binary tree: 6 3 7 / \ 8 9 20 9 / \ 10 15 7 11 ...
分类:
其他好文 时间:
2020-02-02 23:34:00
阅读次数:
66
1 """ 2 Given a binary tree, find its maximum depth. 3 The maximum depth is the number of nodes along the longest path from the root node down to the ...
分类:
其他好文 时间:
2020-02-02 23:16:12
阅读次数:
93
Given a binary tree . Split the binary tree into two subtrees by removing 1 edge such that the product of the sums of the subtrees are maximized. Sinc ...
分类:
其他好文 时间:
2020-02-02 15:59:08
阅读次数:
110
1003 Emergency (25分) As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities ...
分类:
其他好文 时间:
2020-02-02 15:43:47
阅读次数:
85
题目内容 You are given two non empty linked lists representing two non negative integers. The most significant digit comes first and each of their nodes c ...
分类:
其他好文 时间:
2020-02-02 15:26:42
阅读次数:
87
"OK, you are not too bad, em... But you can never pass the next test." feng5166 says. "I will tell you an odd number N, and then N integers. There wil ...
分类:
其他好文 时间:
2020-02-02 13:45:34
阅读次数:
51
82. Remove Duplicates from Sorted List II Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from ...
分类:
其他好文 时间:
2020-02-02 12:06:41
阅读次数:
68
1 """ 2 Given an array of integers, return indices of the two numbers such that they add up to a specific target. 3 4 You may assume that each input w ...
分类:
其他好文 时间:
2020-02-01 23:27:36
阅读次数:
86
1 """ 2 Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and ...
分类:
其他好文 时间:
2020-02-01 23:19:31
阅读次数:
69
1 """ 2 Given the head of a linked list, we repeatedly delete consecutive sequences of nodes that sum to 0 until there are no such sequences. 3 4 Afte ...
分类:
其他好文 时间:
2020-02-01 23:18:44
阅读次数:
83