码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
BCD码与十进制
BCD码(Binary-Coded Decimal?)亦称二进码十进数或二-十进制代码。用4位二进制数来表示1位十进制数中的0~9这10个数码。是一种二进制的数字编码形式,用二进制编码的十进制代码。BCD码这种编码形式利用了四个位元来储存一个十进制的数码,使二进制和十进制之间的转换得以快捷的进行。这种编码技巧最常用于会计系统的设计里,因为会计制度经常需要对很长的数字串作准确的计算。相对于一般的浮点...
分类:其他好文   时间:2015-01-15 00:32:42    阅读次数:188
[C++]LeetCode: 94 Sum Root to Leaf Numbers (先序遍历)
题目: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. Find...
分类:编程语言   时间:2015-01-14 22:59:16    阅读次数:431
[C++]LeetCode: 95 Binary Tree Preorder Traversal (先序遍历)
题目: Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [1,2,3]. Note: Recursive...
分类:编程语言   时间:2015-01-14 22:59:13    阅读次数:174
Tree
Tree 时间限制:1000 ms  |  内存限制:65535 KB 难度:3 描述Little Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital lett...
分类:其他好文   时间:2015-01-14 22:56:51    阅读次数:231
[leetcode]Flatten Binary Tree to Linked List
问题描述: Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / 2 5 / \ 3 4 6 The flattened tree should look like: ...
分类:其他好文   时间:2015-01-14 22:54:05    阅读次数:158
[leetcode] 98 Validate Binary Search Tree
问题描述: Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node'...
分类:其他好文   时间:2015-01-14 22:53:40    阅读次数:179
[Leetcode]Unique Binary Search Trees
Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's 1 .....
分类:其他好文   时间:2015-01-14 22:37:54    阅读次数:241
[LeetCode]173 Binary Search Tree Iterator
https://oj.leetcode.com/problems/binary-search-tree-iterator//** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclassBSTIterator{ // //NOTE //Aftertheiteratorbuilt,ifwemodifytheor..
分类:其他好文   时间:2015-01-14 18:17:56    阅读次数:165
[C++]LeetCode: 93 Binary Search Tree Iterator (经典题,非递归的中序遍历)
题目: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the next smallest number in the BST. Note:...
分类:编程语言   时间:2015-01-14 18:01:28    阅读次数:182
LeetCode--Populating Next Right Pointers in Each Node
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } Populate each next pointer to point to its next right node. ...
分类:其他好文   时间:2015-01-14 18:00:03    阅读次数:139
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!