码迷,mamicode.com
首页 >  
搜索关键字:binary index tree    ( 56466个结果
[LeetCode] Longest Valid Parentheses
第一种方法,用栈实现,最容易想到,也比较容易实现,每次碰到‘)’时update max_len,由于要保存之前的‘(’的index,所以spacecomplexity 是O(n) 1 // 使用栈,时间复杂度 O(n),空间复杂度 O(n) 2 class Solution { 3 publ...
分类:其他好文   时间:2014-06-11 09:16:10    阅读次数:197
[转] 让DIV遮住的链接可以点击
HTML制作中,如果在一个链接或者文字上再有一层DIV的话的,会导致当前的链接或者文字无法选中或者点击。这种情况在Firefox和Chrome 里会发生,但是在IE里居然没有问题。有人会想到用z-index 来解决,给下层的文字或者链接的z-index设一个大值,给上层的div设置一个小值,但是实际...
分类:其他好文   时间:2014-06-11 09:06:21    阅读次数:167
rails Ajax--利用Jquery
viewfunction init_tree(product_name) { var htmlobj=$.ajax({url: "get_all_file?param=" + param_value, async: false}); var jsonNodes = htmlobj.respon...
分类:Web程序   时间:2014-06-11 08:03:40    阅读次数:245
linux命令之-pstree使用说明
pstree shows running processes as a tree. The tree is rooted at either pid or init if pid is omitted. If a user name is specified, all process trees r...
分类:系统相关   时间:2014-06-11 07:46:47    阅读次数:522
剑指offer (8) 旋转数组
1. 查找和排序查找:顺序查找、二分查找、二叉搜索树、哈希表顺序查找:T(n) = O(n) std::find二分查找:T(n) = O(log n) std::binary_search std::lower_bound std::upper_bound哈希表: T(n) = O...
分类:其他好文   时间:2014-06-11 07:45:31    阅读次数:250
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.public class Solution { /** Convert th...
分类:其他好文   时间:2014-06-10 00:22:44    阅读次数:259
leetcode--Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number...
分类:其他好文   时间:2014-06-10 00:01:38    阅读次数:392
ios项目中引用其他开源项目
1. 将开源项目的.xcodeproj拖入项目frameworks2. Build Phases下 Links Binary With Libraries 引入.a文件。Target Dependencies里引入开源项目文件3. Build Setting下的 Search Paths 里 Hea...
分类:移动开发   时间:2014-06-07 20:06:34    阅读次数:287
windows做时间服务器,linux和windows时间同步
找了很多的资料,都没有windows做时间服务,linux同步windows的时间的,最后自己找了一些软件,终于搞定了,写出来给大家共享,以免大家多走弯路首先在http://www.meinberg.de/english/sw/index.htm下载了一个windows的NTP服务程序:ntp417...
分类:Windows程序   时间:2014-06-07 17:05:59    阅读次数:449
线段树(segment tree)
1、概述线段树,也叫区间树,是一个完全二叉树,它在各个节点保存一条线段(即“子数组”),因而常用于解决数列维护问题,基本能保证每个操作的复杂度为O(lgN)。线段树是一种二叉搜索树,与区间树相似,它将一个区间划分成一些单元区间,每个单元区间对应线段树中的一个叶结点。对于线段树中的每一个非叶子节点[a...
分类:其他好文   时间:2014-06-07 16:55:29    阅读次数:307
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!