码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
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.提交成功的代码:C++实现:#...
分类:其他好文   时间:2014-11-24 11:26:30    阅读次数:251
MySQL查询时区分大小写
在创建MySQL数据库时,下面这些参数可供我们选择:*_bin: 表示的是binary case sensitive collation,也就是说是区分大小写的*_cs: case sensitive collation,区分大小写*_ci: case insensitive collation,不...
分类:数据库   时间:2014-11-24 11:20:57    阅读次数:195
[LeetCode]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's key.Th...
分类:其他好文   时间:2014-11-24 10:11:36    阅读次数:152
Leetcode-Maximal Rectangle
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.Analysis:For each position (i,j),...
分类:其他好文   时间:2014-11-24 06:28:38    阅读次数:192
Leetcode-Scramble String
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representatio...
分类:其他好文   时间:2014-11-24 06:27:02    阅读次数:202
leetcode[94] Unique Binary Search Trees
给定n,那么从1,2,3...n总共可以构成多少种二叉查找数呢。例如给定3Givenn= 3, there are a total of 5 unique BST's. 1 3 3 2 1 \ / / / \ ...
分类:其他好文   时间:2014-11-24 00:45:19    阅读次数:327
【原创】leetCodeOj ---Convert Sorted List to Binary Search Tree 解题报告
原题地址:https://oj.leetcode.com/problems/convert-sorted-list-to-binary-search-tree/题目内容:Given a singly linked list where elements are sorted in ascending...
分类:其他好文   时间:2014-11-23 21:34:38    阅读次数:141
【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:...
分类:其他好文   时间:2014-11-23 17:35:12    阅读次数:131
【LeetCode】Path Sum II 解题报告
【题目】 Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example: Given the below binary tree and sum = 22, 5 ...
分类:其他好文   时间:2014-11-23 17:34:18    阅读次数:163
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.C++代码实现:#include#include#include#includeu...
分类:其他好文   时间:2014-11-23 15:53:30    阅读次数:256
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!