码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
LeetCode-Binary Tree Postorder Traversal
1 Given a binary tree, return the postorder traversal of its nodes' values. 2 3 For example: 4 Given binary tree {1,#,2,3}, 5 1 6 \ 7 2 ...
分类:其他好文   时间:2015-03-16 12:28:00    阅读次数:97
Binary Tree Level Order Traversal
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 / 9 20 ...
分类:其他好文   时间:2015-03-16 11:03:15    阅读次数:139
[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 T...
分类:其他好文   时间:2015-03-15 23:32:20    阅读次数:212
leedcode 191 Hamming Weight
191.For example, the 32-bit integer ’11' has binary representation00000000000000000000000000001011, so the function should return 3.Java codeint hammi...
分类:其他好文   时间:2015-03-15 22:52:06    阅读次数:123
Unique Binary Search Trees II
Unique Binary Search Trees II问题:Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.思路: dfs我的代码:public class S....
分类:其他好文   时间:2015-03-15 21:02:34    阅读次数:121
LeetCode Number of 1 Bits
1.题目Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representation 00000000...
分类:其他好文   时间:2015-03-15 19:53:10    阅读次数:92
NLS_COMP和NLS_SORT参数
Oracle默认是采用binary进行排序,这对于例如中文的排序来说,是不恰当的。使用这两个参数可以指定排序的方法,比如拼音或是,要注意可能会引起性能问题。解决方法是使用NLSSORT函数来建立一个函数索引。NLS_COMP = { BINARY | LINGUISTIC | ANSI }BINAR...
分类:其他好文   时间:2015-03-15 18:04:34    阅读次数:137
Binary Tree Level Order Traversal
Binary Tree Level Order Traversal问题: Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, lev....
分类:其他好文   时间:2015-03-15 16:29:32    阅读次数:119
Print a Binary Tree in Vertical Order
Given a binary tree, print it vertically. The following example illustrates vertical order traversal. 1 / \ 2 3 / ...
分类:其他好文   时间:2015-03-15 02:01:09    阅读次数:134
Print Nodes in Top View of Binary Tree
Top view of a binary tree is the set of nodes visible when the tree is viewed from the top. Given a binary tree, print the top view of it. The output ...
分类:其他好文   时间:2015-03-15 01:58:22    阅读次数:169
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!