码迷,mamicode.com
首页 >  
搜索关键字:complete binary search tree    ( 35177个结果
Ubuntu 下matlab 查看memory函数
function checkmemory%Copyright (c) 2014,Lv Qi%All rights reserved.%%Redistribution and use in source and binary forms, with or without modification, a...
分类:其他好文   时间:2014-05-10 20:07:52    阅读次数:413
[leetcode] Best Time to Buy and Sell Stock II
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:其他好文   时间:2014-05-06 00:51:29    阅读次数:353
Leetcode | 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...
分类:其他好文   时间:2014-05-05 23:55:36    阅读次数:407
HDU 4718 The LCIS on the Tree(树链剖分)
Problem DescriptionFor a sequence S1, S2, ... , SN, and a pair of integers (i, j), if 1 2 #include 3 #include 4 #include 5 using namespace std...
分类:其他好文   时间:2014-05-05 23:50:08    阅读次数:445
Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".思路:一个二进制字符串相加;首先从字符串的末尾开始,先二进制字符转化为数字,然后再相加;然后将...
分类:其他好文   时间:2014-05-05 23:10:15    阅读次数:319
线段树入门小结
QUE:线段树?称谓:从刘汝佳的书中得知,“这种数据结构在学术界没有统一的术语,但线段树是最常见的叫法。其他叫法包括区间树(interval tree)、范围树(range tree)等,但这些属于在特定的场合(如计算几何)中有着特殊的意义”。怎么叫看读者的心情,以下统一用线段树称呼。先来作一些了解...
分类:其他好文   时间:2014-05-02 16:21:56    阅读次数:347
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...
分类:其他好文   时间:2014-05-02 15:03:57    阅读次数:386
Out of office 模板
I am out of the office until 0X/0X/201X.I will be checking my email regularly. Please leave a complete message for me and I will respond immediately w...
分类:其他好文   时间:2014-05-02 11:14:21    阅读次数:2686
leetcode: Search a 2D Matrix
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l...
分类:其他好文   时间:2014-05-02 10:41:53    阅读次数:267
leetcode: Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or...
分类:其他好文   时间:2014-05-02 09:54:11    阅读次数:269
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!