BCD码(Binary-Coded Decimal?)亦称二进码十进数或二-十进制代码。用4位二进制数来表示1位十进制数中的0~9这10个数码。是一种二进制的数字编码形式,用二进制编码的十进制代码。BCD码这种编码形式利用了四个位元来储存一个十进制的数码,使二进制和十进制之间的转换得以快捷的进行。这...
分类:
其他好文 时间:
2015-04-21 09:26:33
阅读次数:
137
一、 题目
给你一个二叉树,假设几就站在树的后边,那么此时你就只能看到最右边的节点了。
例如:
1
/ 2 3
\ 5 4
返回值就是[1,3,4]
二、 分析
对于树的遍历,我们通常会使用DFS或BFS,这个题目其实同样是遍历,不过呢,我们只记录下来...
分类:
其他好文 时间:
2015-04-21 00:27:25
阅读次数:
112
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.题目大意:给定一个升序序列的数组,将其转换为二叉搜索树。解题思路:数组中间元素是根元素,根元素将数组划分为...
分类:
其他好文 时间:
2015-04-20 22:39:28
阅读次数:
207
Add BinaryTotal Accepted:39288Total Submissions:158078My SubmissionsQuestionSolutionGiven two binary strings, return their sum (also a binary string)....
分类:
其他好文 时间:
2015-04-20 20:52:08
阅读次数:
200
一: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
时间限制:10000ms
单点时限:1000ms
内存限制:256MB
描述
在上一回和上上回里我们知道Nettle在玩《艦これ》,Nettle在整理好舰队之后终于准备出海捞船和敌军交战了。
在这个游戏里面,海域是N个战略点(编号1..N)组成,如下图所示
其中红色的点表示有敌人驻扎,猫头像的的点表示该地图敌军主力舰队(boss)的驻扎点,虚线表示各个战略点...
分类:
其他好文 时间:
2015-04-20 16:54:16
阅读次数:
358
来源: 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
题目: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
IT英语1-计算机算法常用术语中英对照Data Structures 基本数据结构Dictionaries 字典Priority Queues 堆Graph Data Structures 图Set Data Structures 集合Kd-Trees 线段树Numerical Problems 数...
分类:
编程语言 时间:
2015-04-20 12:49:18
阅读次数:
131
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