码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
插入排序(直接插入排序、折半插入排序)
一、直接插入排序 二、折半插入排序 折半插入排序(binary insertion sort)是对插入排序算法的一种改进。 ...
分类:编程语言   时间:2017-02-05 14:00:11    阅读次数:272
标准遗传算法(二进制编码 python实现)
代码地址:https://github.com/guojun007/binary_sga 种群初始化: binary_sga/population_init/population_init.py 选择操作:(轮盘赌选择) binary_sga/selection/selection.py 交叉操作: ...
分类:编程语言   时间:2017-02-05 13:50:21    阅读次数:396
U面经Prepare: Print Binary Tree With No Two Nodes Share The Same Column
这道题若能发现inorder traversal each node的顺序其实就是column number递增的顺序,那么就成功了一大半 维护一个global variable,colNum, 做inorder traversal 然后level order 一层一层打印出来 ...
分类:其他好文   时间:2017-02-05 13:50:02    阅读次数:166
Binary Search 模板以及例题 (=target, >target, >=target)
根据Jikai Tang的网站和视频总结如下, http://www.tangjikai.com/algorithms/leetcode-binary-search 1. 在sorted array里面找一个特定的数。 由于left和right可以相等,所以L2使用的是while l <= r。L3 ...
分类:其他好文   时间:2017-02-05 12:31:53    阅读次数:143
Behavior trees for AI: How they work
http://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.php by Chris Simpson on 07/17/14 09:35:00 pm 27 commen ...
分类:其他好文   时间:2017-02-05 00:28:17    阅读次数:248
STL--heap概述:make_heap,sort_heap,pop_heap,push_heap
heap并不属于STL容器组件,它分为 max heap 和min heap,在缺省情况下,max-heap是优先队列(priority queue)的底层实现机制。 而这个实现机制中的max-heap实际上是以一个vector表现的完全二叉树(complete binary tree)。 二叉堆( ...
分类:其他好文   时间:2017-02-04 16:30:18    阅读次数:129
mysql从库Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'报错处理
年后回来查看mysql运行状况与备份情况,登录mysql从库查看主从同步状态 突然之间Slave_IO_Running: 状态变成NO了 解决方法。 首先在从库上执行 stop slave; 查看主库master状态 刷新binlog日志 flush logs; 刷新后的日志会+1 例如上面的 Fi ...
分类:数据库   时间:2017-02-04 14:34:51    阅读次数:248
二叉树的三种遍历方式
PS: 此算法参考资料《数据结构与算法JavaScript描述》 1 //------------------------------------------------------------------ 2 //-----------------performance binary tree--... ...
分类:其他好文   时间:2017-02-03 19:47:12    阅读次数:227
Populating Next Right Pointers in Each Node
Given a binary tree Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to NULL ...
分类:其他好文   时间:2017-02-03 19:36:46    阅读次数:168
【计算机基础】 一
1.数制 数制是用一组固定的数字和一套统一的规则来表示数目的方法。按照进位方式计数的数制叫进位计数制。 常见的数制主要有:二进制(Binary),八进制(Octal),十进制(Decimal),十六进制(Hexadecimal)。 每种数制都由两个要素组成,基数和位权。 基数:各种进位计数制中允许选 ...
分类:其他好文   时间:2017-02-03 19:26:42    阅读次数:375
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!