码迷,mamicode.com
首页 >  
搜索关键字:search help    ( 21064个结果
leetcode第一刷_Search in Rotated Sorted Array
旋转数组的查找问题。从头开始扫一遍,O(N)的复杂度,一般也能过,甚至先排序以下,再二分都能过。不过这道题的目的当然不在于此。 想一下旋转之后对我们的查找产生了什么影响。如果没旋转过,我们直接比较target与A[middle]的大小,然后总能非常确定的丢掉源数组的一半,即把搜索空间减半,但是旋转之后,只根据A[middle]是确定不了下一轮的走向的,因为即使A[middle]比target大,...
分类:其他好文   时间:2014-05-12 15:25:32    阅读次数:231
maven 从svn导入项目遇到的问题 No marketplace entries found to handle yuicompressor maven plugin:1.3.0:compile
RT,使用eclipse导入项目时 报   No marketplace entries found to handle yuicompressor maven plugin:1.3.0:compile in Eclipse. Please see Help for more information 我认为同事说的很对, eclipse是面向插件的,maven插件m2ecli...
分类:其他好文   时间:2014-05-12 15:23:26    阅读次数:333
leetcode第一刷_Search in Rotated Sorted Array II
接着上一篇,同样是旋转数组中查找问题。如果这个数组有重复元素怎么办呢?会有什么影响? 我举一个极端的例子,假设数组中的元素是这样的,1,1,2,1,1,1,1,我们要在这个数组中查找2,一开始的A[middle]=1,发现比target小,那我们就看看A[0]和A[N],发现都跟A[middle]相等,那么这个2到底在哪一半中?只有上帝知道,如果他老人家真的存在的话。这种时候我们怎么办呢?没有其...
分类:其他好文   时间:2014-05-12 14:45:35    阅读次数:278
利用存储过程进行组合查询
利用存储过程进行组合查询 /*********************************************************************/  /* proc name : P_am_postjob_search */  /* */  /* Description: 申请单查询 */  /* */  /* parameters: @searchtime 申请...
分类:其他好文   时间:2014-05-12 14:15:38    阅读次数:315
Python写的一个优美的定时器,定时精度可调
# -* coding: utf-8 -*- import sys import os import getopt import threading import time def Usage(): usage_str = '''说明: \t定时器 \timer.py -h 显示本帮助信息,也可以使用--help选项 \timer.py -d num 指定一个延时时间(以毫秒为单位)...
分类:编程语言   时间:2014-05-12 06:29:06    阅读次数:428
【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.1. 将LinkedList的值保存到一个数组中,转化成Convert Sorte...
分类:其他好文   时间:2014-05-12 05:53:09    阅读次数:367
leetcode第一刷_Word Search
这道题之前一直没敢做,没想到前天用递归一遍过了。。 当时为什么想着用递归,而不是dp呢,因为我想到达某个位置的情况有很多,即使从当前位置开始的搜索是已知的,但之前的状态是怎样的也无从得知啊,实话实说,我是不会用dp解这个。。 递归的思路就好说多了,从当前点开始,有上下左右四个位置可以探测,如果探测成功的话,要把当前的位置用其他符号标记出来,以免重复访问。实际上就是DFS嘛,只不过入口多一些。 ...
分类:其他好文   时间:2014-05-11 14:20:56    阅读次数:321
Linux学习笔记总结
零、求人不如求已:        1、 在Linux中,文件,文件夹,驱动,命令,脚本都视为文件,也即一切皆file。        2、记住使用Linux 的关键就是六个字: 命令、选项、参数。        3、学会看帮助,不用求人。    学会看帮助,不用求人。    man touch     touch --help...
分类:系统相关   时间:2014-05-11 06:07:02    阅读次数:567
LeetCode--Search Insert Position
Search Insert Position  Total Accepted: 14091 Total Submissions: 41005My Submissions Given a sorted array and a target value, return the index if the target is found. If not, return the in...
分类:其他好文   时间:2014-05-11 05:53:03    阅读次数:241
linux mono
linux下.net环境;rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm && yum makecache && yum search mono;
分类:系统相关   时间:2014-05-11 00:43:36    阅读次数:332
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!