码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
102. Binary Tree Level Order Traversal (Tree, Queue; BFS)
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 tree [3, ...
分类:其他好文   时间:2016-11-15 23:11:17    阅读次数:164
R之data.table 介绍
首先介绍下data.table的语法,如下所示: 内置的 order() 函数 * 我们可以对一个字符型的列,使用减号“-”,来实现降序排列。 # select取子集方法之subset(x, subset, select) with = FALSE 来引用列名 总结 data.table的语法形式是 ...
分类:其他好文   时间:2016-11-15 19:52:35    阅读次数:292
char、varchar、binary和varbinary的区别与联系
char使用固定长度的空间进行存储,char(4)存储4个字符,根据编码方式的不同占用不同的字节,gbk编码方式,不论是中文还是英文,每个字符占用2个字节的空间,utf8编码方式,每个字符占用3个字节的空间。如果需要存储的字符串的长度跟所有值的平均长度相差不大,适合用char,如MD5。对于经常改变 ...
分类:其他好文   时间:2016-11-15 17:16:48    阅读次数:186
各种进位制转换
在数字后面加上不同的字母来表示不同的进位制。B(Binary)表示二进制,O(Octal)表示八进制,D(Decimal)或不加表示十进制,H(Hexadecimal)表示十六进制。 例如:(101011)B=(53)O=(43)D=(2B)H 二进制 → 十进制 方法:二进制数从低位到高位(即从右 ...
分类:其他好文   时间:2016-11-15 11:12:55    阅读次数:282
Binary Tree Upside Down
Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it up ...
分类:其他好文   时间:2016-11-15 07:37:25    阅读次数:104
100. Same Tree (Tree;DFS)
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 an ...
分类:其他好文   时间:2016-11-15 00:24:23    阅读次数:147
python学习:python中的正则表达式函数match和search()的区别
match函数binary_re=‘[01]*‘ pattern=re.compile(binary_re) m=re.match(binary_re,destStr) ifm: printm.group(0) else: print‘notmatch‘match函数是从字符串起始位置开始进行匹配,匹配失败返回None,匹配成功的话,m.group(0)为匹配的结果 2.search函数 binary_re=‘[01]*‘ pa..
分类:编程语言   时间:2016-11-14 16:25:11    阅读次数:121
JAVA基础(数组)数组排序和查找数组中是否还有某一个数
数组排序和数组中含有某一个数 import java.util.Arrays;class Demo4 { public static void main(String[] args) { //数组中的使用工具:Arrays int[] arr = {1,2,4,5}; //查找数组中是否还有某一个数 ...
分类:编程语言   时间:2016-11-14 15:13:26    阅读次数:223
二分怎么写
主要参考这个https://www.topcoder.com/community/data-science/data-science-tutorials/binary-search/讲的非常仔细。 以前做题的时候,经常遇到一些二分的题目,但是对边界条件,主要是加一还是减一,把握的不是很准确,后来看到 ...
分类:其他好文   时间:2016-11-13 19:01:06    阅读次数:180
[LintCode] Maximum Depth of Binary Tree 二叉树的最大深度
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-11-13 07:49:37    阅读次数:170
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!