码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
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: next()...
分类:其他好文   时间:2015-01-06 20:09:24    阅读次数:159
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 numb...
分类:其他好文   时间:2015-01-06 19:55:57    阅读次数:159
[LeetCode]114 Flatten Binary Tree to Linked List
https://oj.leetcode.com/problems/flatten-binary-tree-to-linked-list/http://blog.csdn.net/linhuanmars/article/details/23717703/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclass..
分类:其他好文   时间:2015-01-06 18:20:38    阅读次数:147
[LeetCode]121 Best Time to Buy and Sell Stock
https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock/http://blog.csdn.net/linhuanmars/article/details/23162793publicclassSolution{ publicintmaxProfit(int[]prices) { //SolutionA: returnmaxProfit_DP(prices); //SolutionB: //returnmaxProfit_Binary(..
分类:其他好文   时间:2015-01-06 18:11:55    阅读次数:176
第30题 Add Binary
Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". Hide Tags  Math String ...
分类:其他好文   时间:2015-01-06 18:06:01    阅读次数:164
[LeetCode] Binary Tree Maximum Path Sum(最大路径和)
Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example:Given the below binary tree, 1 / \ 2 3...
分类:其他好文   时间:2015-01-06 17:38:16    阅读次数:199
[LeetCode]105 Construct Binary Tree from Preorder and Inorder Traversal
https://oj.leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/http://blog.csdn.net/linhuanmars/article/details/24389549/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){va..
分类:其他好文   时间:2015-01-06 15:55:10    阅读次数:101
[LeetCode]106 Construct Binary Tree from Inorder and Postorder Traversal
https://oj.leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/http://blog.csdn.net/linhuanmars/article/details/24390157/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){v..
分类:其他好文   时间:2015-01-06 15:54:59    阅读次数:138
[LeetCode]107 Binary Tree Level Order Traversal II
https://oj.leetcode.com/problems/binary-tree-level-order-traversal-ii/http://blog.csdn.net/linhuanmars/article/details/23414711/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publiccla..
分类:其他好文   时间:2015-01-06 15:49:37    阅读次数:96
[LeetCode]110 Balanced Binary Tree
https://oj.leetcode.com/problems/balanced-binary-tree/http://blog.csdn.net/linhuanmars/article/details/23731355/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclassSolution{ publ..
分类:其他好文   时间:2015-01-06 15:46:32    阅读次数:125
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!