码迷,mamicode.com
首页 >  
搜索关键字:binary hacking    ( 12009个结果
LeetCode OJ - Minimum && Maximum Depth of Binary Tree
这两道题用递归的解法都很简单,只是稍有不同。下面是AC代码: 1 /** 2 * Given a binary tree, find its minimum depth. 3 * the minimum depth is the number of nodes along th...
分类:其他好文   时间:2014-05-10 08:47:32    阅读次数:271
LeetCode OJ - construct Binary Tree from Inorder and Postorder/Preorder Traversal
不断递归的实现!!!!下面是AC代码: 1 /** 2 * Given inorder and postorder traversal of a tree, construct the binary tree. 3 * @param inorder 4 * @param...
分类:其他好文   时间:2014-05-10 08:40:40    阅读次数:297
玩转无线 — GNURADIO 简单运用
大家好, 我是Insight-labs的旺财,这里放出个旺财在Bsides Toronto 2013会上RF-Ninjia Hacking议题中的一个案例,随着物联网越来越火热,而物联网又离不开无线。(RF,这里旺财把这个简单RF无线分析案例放出来跟大家娱乐下,因为本文意在介绍RF hacking的...
分类:其他好文   时间:2014-05-05 10:11:33    阅读次数:403
LeetCode OJ - Balanced Binary Tree
判断树是否是平衡的,这道题中的平衡的概念是指任意节点的两个子树的高度相差不超过1,我用递归的方法把所有的节点的高度都计算了下,并且在计算的过程记录每个节点左右两颗子树的高度差,最后通过遍历这个高度差就可以知道是否是平衡的。下面是AC代码: 1 /** 2 * Given a binary...
分类:其他好文   时间:2014-05-05 09:54:44    阅读次数:378
LeetCode OJ - Symmetric Tree && Same Tree
这两道题,大同小异。 我都是用BFS,在遍历的过程,判断结构是否相同/对称,值是否相同。下面是AC代码: 1 /** 2 * Given a binary tree, check whether it is a mirror of itself (ie, symmetric aroun...
分类:其他好文   时间:2014-05-05 09:48:26    阅读次数:401
LeetCode OJ - Binary Tree Level Order Traversal 1 && 2
BFS以及它的扩展,我发现栈是个很好用的数据结构,特别是对于顺序需要颠倒的时候!!!这里有个重要的信息:可以用null来标识一个level的结束!!!下面是AC代码: 1 /** 2 * Given a binary tree, return the bottom-up level ord...
分类:其他好文   时间:2014-05-05 09:46:06    阅读次数:402
LeetCode OJ - Convert Sorted Array/List to Binary Search Tree
Array和List的区别在于前者可以随机访问,而后者只能顺序访问。对于把排好序的array转成BST,可以用top-down的方式,很直观也很自然,时间复杂度是O(n)。而对于List如果采用同样的方式,每次需要顺序遍历到中间节点,时间复杂度变成O(nlogn),如果换一种思路,down-top,...
分类:其他好文   时间:2014-05-05 09:34:29    阅读次数:454
RFID Hacking–资源大合集
http://www.proxmark.org/forum/index.phpRFID破解神器官方论坛http://rfidiot.org/集成RFID ID识别/暴力破解/读写卡一身的Py包,通读官方网站所有信息会对RFID破解步骤有一个基本了解。http://www.rfdump.org/(被墙...
分类:其他好文   时间:2014-05-04 20:08:02    阅读次数:384
poj 1430 Binary Stirling Numbers
Binary Stirling NumbersTime Limit:1000MSMemory Limit:10000KTotal Submissions:1761Accepted:671DescriptionThe Stirling number of the second kind S(n, m)...
分类:其他好文   时间:2014-05-04 19:34:32    阅读次数:434
travel the binary tree by level 4 ( from down to top and from left to right every level )
travel the binary tree by level 4 ( from down to top and from left to right every level ) 个人信息:就读于燕大本科软件工程专业 目前大三; 本人博客:google搜索“cqs_2012”即可; 个人爱好:酷爱数据结构和算法,希望将来从事算法工作为人民作出自己的贡献; 博客内容:tr...
分类:其他好文   时间:2014-05-04 18:22:16    阅读次数:381
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!