码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
红黑树
介绍还有一种平衡二叉树:红黑树(Red Black Tree),红黑树由Rudolf Bayer于1972年发明,当时被称为平衡二叉B树(symmetric binary B-trees),1978年被Leonidas J. Guibas和Robert Sedgewick改成一个比較摩登的名字:红黑...
分类:其他好文   时间:2015-02-19 22:59:20    阅读次数:368
[LeetCode] Construct Binary Tree from Inorder and Postorder Traversal 由中序和后序遍历建立二叉树
Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.这道题要求从中序和后序遍历的...
分类:其他好文   时间:2015-02-19 18:37:40    阅读次数:221
leetcode 95. Unique Binary Search Trees II
Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni...
分类:其他好文   时间:2015-02-19 17:28:16    阅读次数:140
leetcode 96. 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-02-19 16:19:37    阅读次数:157
leetcode 106. Construct Binary Tree from Inorder and Postorder Traversal
Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.[Solution]后序定根...
分类:其他好文   时间:2015-02-18 11:50:07    阅读次数:129
leetcode 105. Construct Binary Tree from Preorder and Inorder Traversal
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.[Solution]先序定根,...
分类:其他好文   时间:2015-02-18 11:47:49    阅读次数:151
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 n...
分类:其他好文   时间:2015-02-18 11:45:52    阅读次数:129
poj2845 01000001
01000001 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10571   Accepted: 3345 Description Adding binary numbers is a very simple task, and very similar t...
分类:其他好文   时间:2015-02-18 09:37:05    阅读次数:141
[LeetCode] Convert Sorted List to Binary Search Tree 将有序链表转为二叉搜索树
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.这道题是要求把有序链表转为二叉搜索树,和之前那道Convert Sorted Ar...
分类:其他好文   时间:2015-02-18 08:24:13    阅读次数:160
从RAM新建QIcon对象 / Create a QIcon from binary data
一般,QIcon是通过png或ico等图标文件来初始化的,但是如果图标资源已经在内存里了,或者一个zip压缩文件内,可以通过QPixmap作为桥梁,转换为图标。zf = zipfile.ZipFile("library.zip") # 准备zip文件pm = QtGui.QPixmap() ...
分类:其他好文   时间:2015-02-17 20:59:24    阅读次数:354
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!