Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 这个题目只要注意各种情况你就成功了一大半,特别要注意的是对进位赋值后可能产生的变化, ...
分类:
其他好文 时间:
2016-09-17 00:10:27
阅读次数:
143
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet ...
分类:
其他好文 时间:
2016-09-16 21:15:36
阅读次数:
109
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 ...
分类:
其他好文 时间:
2016-09-16 21:03:29
阅读次数:
153
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 ...
分类:
其他好文 时间:
2016-09-16 19:40:27
阅读次数:
98
题目: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 题目只有一句话:把一个按升序排列的数组,装换成一个平衡二叉树。 代码: 很久没研究数据结构了,先 ...
分类:
其他好文 时间:
2016-09-16 14:09:43
阅读次数:
140
1 Search in Rotated Sorted Array 二分搜索,注意分清各种情况 1 public class Solution { 2 public int search(int[] nums, int target) { 3 int i = 0, j = nums.length - ...
分类:
其他好文 时间:
2016-09-16 07:53:35
阅读次数:
191
1. Counting Bits Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary rep ...
分类:
其他好文 时间:
2016-09-16 07:51:56
阅读次数:
148
说说表达式树 - Expression Trees 序 简单说下表达式树。 目录 介绍 表达式树以树形数据结构表示代码,其中每一个节点都是一种表达式,比如方法调用和 x < y 这样的二元运算等。 你可以对表达式树中的代码进行编辑和运算。这样能够动态修改可执行代码、在不同数据库中执行 LINQ 查询 ...
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic ...
分类:
其他好文 时间:
2016-09-16 00:14:08
阅读次数:
158
一直以来我都特别好奇,网上很多文件断点上传是怎么实现的,像百度云,最近看到一篇关于HTML5新特性的文章,里面的BLOB对象和FILE对象,有一个slice方法,可以将BLOB对象进行分割。BLOB(Binary Large Object)二进制大对象,属于XMLHttpRequest2.0中的一员 ...
分类:
Web程序 时间:
2016-09-15 17:57:36
阅读次数:
182