码迷,mamicode.com
首页 >  
搜索关键字:search box    ( 20571个结果
Leetcode: Search a 2D Matrix
这道题本来思路并不复杂,先对第一列做binary search, 找到target所在的行,再对所在的行做binary search,找到target在或不在。但是我在编程的时候遇到了很多问题,堆栈溢出(StackOverflowError)折腾死我了,一些边界条件的考虑也颇费周折。我之所以会碰到堆...
分类:其他好文   时间:2014-05-23 08:35:31    阅读次数:294
LeetCode: Search in Rotated Sorted Array [032]
【题目】 Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target value to search. If found in the array return its index, otherwise return -1. You may assume no du...
分类:其他好文   时间:2014-05-22 10:43:12    阅读次数:310
LeetCode: Search for a Range [033]
【题目】 Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, return [-1, -1]. For example, Given [5...
分类:其他好文   时间:2014-05-22 06:44:39    阅读次数:265
1.把二元查找树转变成排序的双向链表
Binary search tree to sorted double linked list.
分类:其他好文   时间:2014-05-22 05:30:47    阅读次数:207
debian7安装rails各种坑!
昨晚在WIN7下面装了vagrant最新版,然后下载了wheezy32.box,再一次的开启了ROR之旅,此前在windows上尝试过两次,终究是没办法进入正常的开发状态。不得不说,ROR的环境配置真心很坑!你要注意ruby的版本,rails的版本,gem的版本,一个不小心,新手就掉进去了,很受挫折...
分类:其他好文   时间:2014-05-22 03:32:24    阅读次数:306
6.二元查找树的后序遍历结果
Verify post-order sequence of binary search tree.
分类:其他好文   时间:2014-05-22 03:20:39    阅读次数:288
11.求二元查找树的镜像
Mirror a binary search tree.
分类:其他好文   时间:2014-05-22 02:02:55    阅读次数:244
AJAX实现导航式多条件搜索
导航式搜索在实际网站开发中有很多应用,其实现原理也不复杂,关键是如何记忆所选的条件。常见的方式有存入session、存入数组等。本文采用的是AJAX+数组的方式,在不跳转,不刷新整个页面的条件下动态返回查询结果。效果图如下:1.search.jsp通过将所选的查询条件存入数组,通..
分类:其他好文   时间:2014-05-20 23:08:38    阅读次数:372
jQuery -> 获取指定上下文中的DOM元素
jQuery函数的第二个参数可以指定DOM元素的搜索范围。 第二个参数可分为以下类型 DOM referencejQuery wrapperdocument 代码示例 // search within all form elements, using a wrapper for context, // alerts "8...
分类:Web程序   时间:2014-05-20 16:32:25    阅读次数:377
leetCode解题报告5道题(九)
5道题目分别是:【Combinations】、【Search a 2D Matrix】、【Scramble String 】、【Rotate List 】、【Partition List】,由于有一些题目不需要发一整篇博文来记录,所以就将这些题目以一篇博文5道来记录。...
分类:其他好文   时间:2014-05-20 15:36:16    阅读次数:293
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!