【题目】
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from left to right.
The first integer of each row is greater than the last integer of the previous ...
分类:
其他好文 时间:
2014-06-05 08:28:43
阅读次数:
321
1,建索引很简单,一行代码
g:/service/coreseek/bin/indexer -c g:/service/coreseek/etc/csft_mysql.conf person
前面是你bin目录下的indexer程序 后面-c指后面会跟配置文件 然后是配置文件地址 最好都用绝对地址 在后面是索引 也可以用--all 即对配置文件的所有部分都做索引
然后写成一个批处理文...
分类:
其他好文 时间:
2014-06-04 23:22:13
阅读次数:
256
问题
输入:一个表示数字的字符串,需要考虑不同的输入形式。
输出:对应的整数
特殊输入形式:
1.输入开始几个字符为空格
2.考虑正负号
3.数字字符不属于[0,9]时,输出当前结果
4.字符串代表的数字大于INT_MAX或者小于INT_MIN时输出INT_MAX或者INT_MIN。
class Solution {
// out of range...
分类:
其他好文 时间:
2014-06-03 06:30:14
阅读次数:
314
以下通过Simple Serial Interface进行设置,非扫描官方datasheet的设置条码....
分类:
其他好文 时间:
2014-06-03 05:03:16
阅读次数:
219
【题目】
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target is in the array.
【题意】
在“Search in Rotated Sorted Array”的基...
分类:
其他好文 时间:
2014-06-03 01:55:38
阅读次数:
173
【题目】
Given a 2D board and a word, find if the word exists in the grid.
The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be use...
分类:
其他好文 时间:
2014-06-03 01:07:58
阅读次数:
329
【题目】
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,
Given n = 3, there are a total of 5 unique BST's.
1 3 3 2 1
\ / / / \ 3 2 1 ...
分类:
其他好文 时间:
2014-06-01 15:34:24
阅读次数:
231
【题目】
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST's shown below.
1 3 3 2 1
\ / / / \ ...
分类:
其他好文 时间:
2014-06-01 15:33:45
阅读次数:
297
Description
T. Chur teaches various groups of students at university U. Every U-student has a unique Student Identification Number (SIN). A SIN s is an integer in the range 0 ≤ s ≤ MaxSIN with MaxS...
分类:
其他好文 时间:
2014-06-01 07:40:18
阅读次数:
248
1查找字符位置函数:strpos($str,search,[int]):查找search在$str中的第一次位置从int开始;stripos($str,search,[int]):函数返回字符串在另一个字符串中第一次出现的位置。该函数对大小写不敏感strrpos($str,search,[int])...
分类:
Web程序 时间:
2014-05-31 14:07:06
阅读次数:
329