码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
Convert Sorted Array to Binary Search Tree——LeetCode
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.题目大意:给定一个升序序列的数组,将其转换为二叉搜索树。解题思路:数组中间元素是根元素,根元素将数组划分为...
分类:其他好文   时间:2015-04-20 22:39:28    阅读次数:207
leetcode_67题——Add Binary(字符串string,反向迭代器reverse_iterator,栈stack)
Add BinaryTotal Accepted:39288Total Submissions:158078My SubmissionsQuestionSolutionGiven two binary strings, return their sum (also a binary string)....
分类:其他好文   时间:2015-04-20 20:52:08    阅读次数:200
LeetCode89/60 Gray Code/Permutation Sequence--迭代
一:Leetcode 89 Gray Code 题目:The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in ...
分类:其他好文   时间:2015-04-20 17:10:42    阅读次数:148
【hihoCoder 1139】 二分·二分答案
时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 在上一回和上上回里我们知道Nettle在玩《艦これ》,Nettle在整理好舰队之后终于准备出海捞船和敌军交战了。 在这个游戏里面,海域是N个战略点(编号1..N)组成,如下图所示 其中红色的点表示有敌人驻扎,猫头像的的点表示该地图敌军主力舰队(boss)的驻扎点,虚线表示各个战略点...
分类:其他好文   时间:2015-04-20 16:54:16    阅读次数:358
【CTF】Reverse Backdoor 2015 Echo
来源: Backdoor CTF 2015 Little Suzie started learning C. She created a simple program that echo's back whatever you input. Here is the binary file. The ...
分类:其他好文   时间:2015-04-20 16:20:20    阅读次数:318
LeetCode OJ:Binary Tree Right Side View
题目:Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exa...
分类:其他好文   时间:2015-04-20 13:12:01    阅读次数:155
leetcode || 101、Symmetric Tree
problem: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: 1 / 2 2 / \ / 3 4 4 ...
分类:其他好文   时间:2015-04-20 11:16:24    阅读次数:209
leetcode || 102、Binary Tree Level Order Traversal
problem: 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,9,20,#,#,15,7}, 3...
分类:其他好文   时间:2015-04-20 11:14:41    阅读次数:131
Reverse Bits
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:其他好文   时间:2015-04-20 11:01:21    阅读次数:128
【leetcode】Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.采用二分递归。 1 class Solution { 2 public: 3 TreeNode *...
分类:其他好文   时间:2015-04-19 21:10:54    阅读次数:173
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!