【题目】
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.
Here, we will use the integers 0, 1, and 2 to represent the color red, white, and...
分类:
其他好文 时间:
2014-06-07 01:17:49
阅读次数:
269
[lvhongmin@AY1401201736089361adZ start_svr]$ cat startall_svr.sh
#!/bin/bash
errpath[0]=''
errnum=0
runnum=0
curr_path=`pwd`
#进程的名字
array[${#array[*]}]=/home/lvhongmin/bin/bin....
分类:
其他好文 时间:
2014-06-05 11:11:43
阅读次数:
243
Problem Description:
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete at most two transa...
分类:
其他好文 时间:
2014-06-05 09:33:52
阅读次数:
342
[lvhongmin@AY1401201736089361adZ start_svr]$ cat killall_svr.sh
#!/bin/bash
unrun[0]=''
unnum=0
runnum=0
#进程的名字
array[${#array[*]}]=paiyouQuan.svr
array[${#array[*]}]=jjm.cornucopia.svr...
分类:
其他好文 时间:
2014-06-05 08:04:29
阅读次数:
277
【题目】
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.
You should pack your words in a greedy approach; that is, pack as many words as you can in each line. Pad ...
分类:
其他好文 时间:
2014-06-04 22:37:46
阅读次数:
389
quick sort of array and linked list
分类:
其他好文 时间:
2014-06-03 08:16:22
阅读次数:
359
题目:Problem DescriptionGiven a two-dimensional
array of positive and negative integers, a sub-rectangle is any contiguous
sub-array of size 1 x 1 or gr...
分类:
其他好文 时间:
2014-05-31 11:35:43
阅读次数:
271
Jump Game IIGiven an array of non-negative
integers, you are initially positioned at the first index of the array.Each
element in the array represents...
分类:
其他好文 时间:
2014-05-31 03:14:14
阅读次数:
243
DescriptionYou have an
arraya[1],?a[2],?...,?a[n], containing distinct integers from1ton. Your task is
to sort this array in increasing order with the...
分类:
其他好文 时间:
2014-05-31 01:35:23
阅读次数:
318
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-30 15:00:54
阅读次数:
335