Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:
其他好文 时间:
2017-06-19 00:28:39
阅读次数:
253
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and ...
分类:
其他好文 时间:
2017-06-18 23:40:34
阅读次数:
295
Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. ...
分类:
其他好文 时间:
2017-06-18 23:39:22
阅读次数:
172
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: But the fol ...
分类:
其他好文 时间:
2017-06-18 23:36:48
阅读次数:
224
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 ...
分类:
其他好文 时间:
2017-06-18 23:33:51
阅读次数:
171
Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical a ...
分类:
其他好文 时间:
2017-06-18 23:33:14
阅读次数:
187
题目链接 Problem Description The Old Frog King lives on the root of an infinite tree. According to the law, each node should connect to exactly two nodes ...
分类:
其他好文 时间:
2017-06-18 20:47:29
阅读次数:
239
题目: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary tr ...
分类:
编程语言 时间:
2017-06-18 13:16:02
阅读次数:
173
1、速率(数据率,码元率) 比特(bit)是计算机中数据量的单位,也是信息论中使用的信息量的单位。bit(binary digit),是一个“二进制数字”,因此一个比特就是二进制数字中的一个1或0。 速率即数据率或比特率,单位b/s,或kb/s,Mb/s,Gb/s等 2、带宽 本来是指信号具有的频带 ...
分类:
其他好文 时间:
2017-06-18 13:12:41
阅读次数:
220
Given the root of a binary tree, then value v and depth d, you need to add a row of nodes with value v at the given depth d. The root node is at depth ...
分类:
其他好文 时间:
2017-06-18 13:11:51
阅读次数:
144