Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. ...
分类:
其他好文 时间:
2017-11-18 11:15:18
阅读次数:
115
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and sum ...
分类:
其他好文 时间:
2017-11-18 11:07:42
阅读次数:
122
Invert a binary tree. to Trivia:This problem was inspired by this original tweet by Max Howell: ...
分类:
其他好文 时间:
2017-11-18 00:50:00
阅读次数:
227
Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in th ...
分类:
其他好文 时间:
2017-11-17 17:01:49
阅读次数:
132
npm install --save node-sass --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist --sass-binary-site=http://npm.taobao.org... ...
分类:
其他好文 时间:
2017-11-17 00:14:25
阅读次数:
183
You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need t ...
分类:
其他好文 时间:
2017-11-16 11:53:29
阅读次数:
150
思路: 1. 使用一个栈保存结点(列表实现); 2. 如果结点存在,入栈,然后将当前指针指向左子树,直到为空; 3. 当前结点不存在,则出栈栈顶元素,并把当前指针指向栈顶元素的右子树; 4. 栈不为空,循环2、3部。 代码如下,解决了leetcode94. Binary Tree Inorder T ...
分类:
编程语言 时间:
2017-11-15 23:41:54
阅读次数:
274
一、前言 二、题485 Max Consecutive Ones Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will ...
分类:
编程语言 时间:
2017-11-14 17:17:20
阅读次数:
183
链接 "637. Average of Levels in Binary Tree" 题意 给定非空二叉树,求出每一层数的平均值 思路 利用队列存储每一层的数,存完之后需要取出size,再循环求平均值。这样保证了循环的次数就是每一层的结点数。 代码 Java / Definition for a b ...
分类:
其他好文 时间:
2017-11-14 17:13:00
阅读次数:
151
Embedded Binary Bundle Identifier: com.music4kid.EasyText.KeyboardDCJ Parent App Bundle Identifier: com.music4kid.EasyTextDCJ ...
分类:
移动开发 时间:
2017-11-13 21:33:42
阅读次数:
172