由买买提看人间百态

topics

全部话题 - 话题: rearrange
首页 上页 1 2 3 4 5 6 7 下页 末页 (共7页)
l****z
发帖数: 29846
1
Arrogant Democrats Think They Have Role to ‘Protect’ Titanic Wreck Site
April 15, 2012 |
by Warner Todd Huston
The Titanic sunk 100 years ago this year. The great ship went down in
international waters as a vessel of British registry. When it went down the
United States was barely a presence on the international stage. Yet now, 100
years later, American Democrats imagine they have the duty and power to
control what will happen at the final resting place of over 1,500 passengers.
In their arrogan... 阅读全帖
l****z
发帖数: 29846
2
来自主题: USANews版 - GM could be heading for bankruptcy again
By: John Hayward
8/16/2012 10:17 AM
President Obama loves to tout the General Motors bailout as the signature “
achievement” of his presidency, even though current taxpayer losses on the
deal are estimated at over $25 billion. The exact degree to which the rest
of us got soaked so Obama could give GM to his union allies changes
constantly as the value of the stock held by We the People fluctuates. You
don’t remember being asked if you would like to become a GM stockholder and
willingly acc... 阅读全帖
f******u
发帖数: 767
3
United States Court of Appeals For the Seventh Circuit
Chicago, Illinois 60604
Argued March 6, 2013
Decided June 27, 2013
Before
DANIEL A. MANION, Circuit Judge
DIANE P. WOOD, Circuit Judge
DIANE S. SYKES, Circuit Judge
No. 11‐2991
YONGPING ZHOU, Plaintiff‐Appellant,v.PATRICK T. BELANGER,Defendant‐
Appellee.
Appeal from the United States District Court for the Southern District of
Indiana, Indianapolis Division.
No. 1:07‐cv‐0633‐WTL‐TAB
William T. Lawrence,Judge.
O R D E R
After Yongping Zhou go... 阅读全帖
f*******e
发帖数: 3433
4
CBS不是左派吗?怎么选了3个都减税的例子做新闻。
Most Americans will get a tax cut next year under the plan Congress passed
this week, but figuring out exactly how much your family will save is tricky
. Republicans say a typical family of four earning $73,000 per year will see
taxes drop by more than $2,000. But circumstances can vary widely depending
on factors like income, the number of children or where you live.
GOP tax bill fact-check: How both sides are stretching the truth
Accountant Jeffrey Levine CBS NEWS
As ... 阅读全帖
c****x
发帖数: 6601
5
【 以下文字转载自 Military 讨论区 】
发信人: cccpwx (flg政庇小学生), 信区: Military
标 题: 特朗普曾被警告中国“摧毁美国”只需这招 zz
发信站: BBS 未名空间站 (Wed Sep 12 00:01:05 2018, 美东)
http://www.guancha.cn/internation/2018_09_12_471736.shtml
【文/观察者网 徐乾昂】还没开卖就已稳坐亚马逊书榜头名,“水门事件”爆料人伍德
沃德的新书《恐惧:白宫里的特朗普》昨天(11日)一开售,出版商宣布加印。CNN新
闻网透露,如今此书的总印数已达100万册。
美国某书店 图自美国新闻与世界报道
这书到底有啥料,导致这么高的人气?昨晚观察者网已经剧透了一波,可以说是一本“
讨伐”特朗普合集了。
今天,一起来读另一节涉华内容:有官员警告特朗普,美国96.6%的抗生素都是中国生
产,对华发动贸易战美国无非是自取灭亡,中国“摧毁美国”只需一招。
但特朗普却“奇怪地看着对方”,最终没有理会这个谏言。
“中国想要摧毁美国,只需不卖抗生素给我们就行”
据《恐惧》曝料,白... 阅读全帖
i*********e
发帖数: 1010
6
来自主题: Automobile版 - 2013 subaru impreza开了一个月有感
hmm, not sure. Maybe I were wrong. But the history record I read says:
In 1950, Fuji Sangyo was divided into 12 smaller corporations according to
the Japanese Government's 1950 Corporate Credit Rearrangement Act, anti-
zaibatsu legislation, but between 1953 and 1955, four of these corporations
and a newly formed corporation Fuji Kogyo, a scooter manufacturer;
coachbuilders Fuji Jidosha; engine manufacturers Omiya Fuji Kogyo; chassis
builders Utsunomiya Sharyo and the Tokyo Fuji Dangyo trading co... 阅读全帖
g***e
发帖数: 508
7
来自主题: Faculty版 - 请教一个可能有点奇怪的签证
It would be too risky, better stay here and rearrange the trip to China.
a**********d
发帖数: 2293
8
一上午就在rearrange RA 办公室的家具,一共三个desks摆来摆去,刚刚回到9点钟时
候的样子,现在正在跟一个RA拿尺子到处量,笑死我了。
p*****m
发帖数: 7030
9
来自主题: Faculty版 - co-first author一问 (转载)
绝对不可以把。前一段看了一本给junior faculty写的书 里面直接写
“Do not rearrange the published order of
authors to show that you have equal first authorship.” 还是斜体强调
l******a
发帖数: 278
10
来自主题: Faculty版 - English Question:
What about this?
"Such novel methods ensure rigorous and more accurate analyses and therefore
the interpretation in applications is more reasonable and convinsible."
or
"Such a novel and rigorous method ensures the analysis more accurate and
robust, which therefore results in more reasonable and convinsible
interpretations in it's applications."
Of cause you can combine and rearrange above two ways.
S***n
发帖数: 102
11
来自主题: Faculty版 - [BSSD] 对改课一事的一些感想
Agreed and none taken. I am sorry that I am unable to write in Chinese, as I
have never learnt how to type in Chinese for an old guy, unfortunately.
Expressing us in Chinese is certainly much easier and straight forward. This
also serves to demonstrate how difficult it is when we have to deal with
non-scientific issues as faculty in the U.S. English grammar, sentence
structure, and logic- where to start?
As someone who dealt with HR issues on annual performance reviews, written
reprimands and f... 阅读全帖
l**h
发帖数: 41
12
来自主题: Gowest版 - to guys applying
never use HTML format and never use chinese character set.
most professors never check email using PC.
keep this in your mind, UNIX is prominant here.
if u use word to write your resume, please use notepad to rearrange it.
u will find a lot of simbols unreadable in word.
plain text is the best.
p********e
发帖数: 17
13
来自主题: Gowest版 - 征朋友(NYC)
这个学期选了molecular Immunology! 好难啊!!尤其是那个gene rearrangement里面
的各种酶怎么样作用,看得我头大啊头大啊!!呜呜。。
板上有谁学过这个课吗,私下可以交流讨论!
学免疫的女生伤不起!!!有没有!!!
r*****8
发帖数: 2697
14
short comments form ClieOS:
"Here is some info - as far as current E9 user is concerned, E09K isn't an
upgrade for SQ, The amp section of both models will be the same so they
should more or less sound the same. Instead of calling E09K as E9's upgrade,
the more correct term will be reversion. The actual parts that get upgraded
are all in functionality that don't affect the SQ. The intension is to
remake the E9 to more tightly integrated with E17, rearrange and remove some
of the sockets and switc... 阅读全帖
r**u
发帖数: 1567
15
来自主题: JobHunting版 - 再来道题
Given a n*m matrix having numbers such that each row and each column sorted.
Now print the numbers in present in the matrix in sorted order..
ps: He gave me the hint as, we can rearrange the matrix.
Is it possible to do it better than k-way merge?
l***i
发帖数: 1309
16
The relative orders are preserved.
Example:
input [-5 -7 3 4 -2 9 -1 7]
output [ 3 4 9 7 -5 -7 -2 -1]
r**u
发帖数: 1567
17
我觉得不能O(n)。这个跟bubble sort差不多。

negative
r****o
发帖数: 1950
18
我觉得时间复杂度可以O(n)阿,
先全部扫描一篇,统计有多少正数和负数,假定正数个数和负数个数分别为n1和n2。
然后再扫描一遍,根据n1和n2我们可以知道这些数在新数组中的位置。
不过空间复杂度好像也要O(n)。
l***i
发帖数: 1309
19
Divide and conquer can give you nlogn. But I don't know if O(n) is possible.
r****o
发帖数: 1950
20
能不能说说你的Divide and conquer算法阿,呵呵。

possible.
l***i
发帖数: 1309
21
split into two halves, solve each half recursively, then do some swaps to
get the positive subarray from right to left and the negative subarray from
right to left.
r**u
发帖数: 1567
22
我觉得不对,in-place的话,每个element移动到对应的位置都是要O(n)步,无论用啥
法子。所以overall复杂度还是O(n^2)。

from
l***i
发帖数: 1309
23
dude, this is an array
r**u
发帖数: 1567
24
so what? 你能把你O(nlogn)算法具体写出来,给个例子么?dude,不要想当然。
o*******7
发帖数: 13
25
O(n)还是有希望的。虽然每个element移动最坏情况下确实要O(n)步,但是如果设计巧
妙的话,有可能并不是每一个
element都需要O(n),这样amortize下来,也许最后能平均成O(1). 最后也许O(n)就能
解决...
但是具体怎么做还没想到。
c*****y
发帖数: 90
26
好像不行,你试一个例子。

to
from
h********0
发帖数: 440
27
来自主题: JobHunting版 - discuss an array rearrange question
given an array with data like: a1 a2... an b1 b2 ...bn
Change the array to a1 b1 a2 b2 ... an bn
看到career cup上这个题目可以用divide and conquer,但是那个exchange的部分我
test了几个情况,好像都有问
题。
Rough idea:
find the middle index r = floor((p+q)/2)
It partitions the array to part 1 [p, r] and part2 [r+1, q]
then exchange the second half of part [(p+r)/2...r] and the first half of
part 2 [r+1, (r+q)/2]
recursively call this function.
Initially, call this function func(p,q) use parameters p=1,q=2n
Test case 1: a1 a2 a3 a
r**u
发帖数: 1567
28
来自主题: JobHunting版 - discuss an array rearrange question
这题已经被讨论好多遍了,结论是不用extra space只能O(n^2)。
S******A
发帖数: 1002
29
来自主题: JobHunting版 - discuss an array rearrange question
交换[(n-1)/2, n-1] and [n, n+(n-1)/2]
h********0
发帖数: 440
30
来自主题: JobHunting版 - discuss an array rearrange question
我知道这个可能被讨论很多遍了,我现在想了解的是如果用这个
divide and conquer 的解决办法,有没有什么更好的方式解决这个recursion的问题。
B*****t
发帖数: 335
31
来自主题: JobHunting版 - discuss an array rearrange question
there is a paper on how to do it in O(N) without extra space. But need some
mathematical results from number theory.
Maybe I am wrong, not very clear.
but it can be done in O(NlogN)
h********0
发帖数: 440
32
来自主题: JobHunting版 - discuss an array rearrange question
you can try it using the above test cases, it does not work.
h********0
发帖数: 440
33
来自主题: JobHunting版 - discuss an array rearrange question
Thought of a naive change, but the code is not pretty.
Basically, this recursion is a problem for partitions with odd numbers.
We can do a preprocess after partition.
1. if the two parts contain even number,no change.
2. if the two parts contain odd number,
do the following ugly exchange
part 1: [p...r]
part 2: [r+1 ...q]
logically:
exchange the right half of part 1 and the left half of part 2
move the middle element of part 1 to array[r]
move the middle element of part
b**f
发帖数: 20
34
来自主题: JobHunting版 - discuss an array rearrange question
It is the n*2 matrix transposition problem
http://en.wikipedia.org/wiki/In-place_matrix_transposition
r****o
发帖数: 1950
35
来自主题: JobHunting版 - discuss an array rearrange question
我也想过这个问题,感觉如果2n是2的几次方的话,用divide and conquer 好做。
否则好像很麻烦。
f**r
发帖数: 865
36
来自主题: JobHunting版 - discuss an array rearrange question
The divide & conquer algorithm is nlog(n) ah, N elements swapped in each
round, logn rounds in total.
r****o
发帖数: 1950
37
来自主题: JobHunting版 - discuss an array rearrange question
能不能说说如果2*n不是2的几次方(如4,8,16...)的话,用divide and conquer怎么作?
r****o
发帖数: 1950
38
来自主题: JobHunting版 - discuss an array rearrange question
请问不用extra space 是什么意思啊?
临时变量行不?
能不能说说你的O(n^2)的思路?
f**r
发帖数: 865
39
来自主题: JobHunting版 - discuss an array rearrange question
One final pass for the remaining numbers. Example:
a1 a2 a3 a4 a5 a6
b1 b2 b3 b4 b5 b6
=>
a1 b1 a3 b3 a5 b5
a2 b2 a4 b4 a6 b6
=>
a1 b1 a2 b2 a5 b5
a3 b3 a4 b4 a6 b6
Now we would like to switch (a5, b5) (incomplete) with (a3, b3, a4, b4).
Here, the problem is equivalent to left shift subarray {a5 b5 a3 b3 a4 b4}
by 2, another interview question that has an O(N) solution. :-)

作?
d********e
发帖数: 132
40
来自主题: JobHunting版 - discuss an array rearrange question
In-Place Algorithm for In-Shuffle
http://arxiv.org/abs/0805.1598
Z*****Z
发帖数: 723
41
来自主题: JobHunting版 - Google经典题目一问
Given a Data Structure having first n integers and next n chars. A = i1 i2 i
3 ... iN c1 c2 c3 ... cN.Write an in-place algorithm to rearrange the elemen
ts of the array ass A = i1 c1 i2 c2 ... in cn
O(nlgn)的算法我知道。有没有O(n)的算法?
s*****n
发帖数: 5488
42
来自主题: JobHunting版 - 报google offer + 教训
if o(n). simply keep a sort array, then dewindow, remove one left a blank
position, then when enwindow, insert the one and rearrange like insert sort.
P********l
发帖数: 452
43
来自主题: JobHunting版 - 赛马题
确实要两次。你后面的分析也对,但是总的来说这个方法不太容易说清楚。
我又加了一种方法(solution 1),比较容易理解一些。
http://www.sureinterview.com/shwqst/1062001/154001
Round one
1. (7 races) Divide the cars into 7 groups and get the order within each
group.
2. (1 race) Take the 7 medians and sort them. Find the median of medians
(denote as o). In following example, it is 34.
3. (3 races) Find the rank of the median of medians. Take 6 elements from
lower-left corner (25 ~ 33) and upper-right corner (13 ~ 21) and race
against the o (34). A... 阅读全帖
j***y
发帖数: 2074
44
来自主题: JobHunting版 - 问个anagram的题目啊
在看Hacking_a_Google_Interview_Handout_2.pdf,里面提到:
Classic Question #6: Data structure for anagrams
Given an English word in the form of a string, how can you quickly find all
valid anagrams for that string (all valid rearrangements of the letters that form
valid English words)? You are allowed to pre‐compute whatever you want to and
store whatever you optionally pre‐compute on disk.
Answer: We want to use a hash table! If your interviewer really hates hash tables (which they sometimes do for some... 阅读全帖
s******n
发帖数: 226
45
来自主题: JobHunting版 - 问两道google面试题
能不能这样,把数组排序以后,把他变成一个以median为root的数组,然后找一个
index变换方法,这样就可以用algorithm in c里面那个,按照index rearrange数组的
方法了
m******e
发帖数: 353
46
来自主题: JobHunting版 - 从水木上看到个数组题
ok, my bad, keep track of range [0, neg) and [numNeg, pos), and do not
rearrange those (since they are already in the correct place)
use [neg, numNeg) and [pos, N) as circular buffer for un-processed elements
#include
#include
#include
using namespace std;
void print(const vector& input) {
for(size_t i = 0; i < input.size(); ++i) {
cout << input[i] << " ";
}
cout << endl;
}
int numNegatives(const vector& input) {
int cnt = 0;
... 阅读全帖
B*******1
发帖数: 2454
47
来自主题: JobHunting版 - 问个amazon面试题
Given a string having 2n charecters as c1 c3 c5 c7...c2n-1 c2 c4 c6 .....c2n
write an algorithm to rearrange the charecters so that the string will
become as
c1 c2 c3 c4 c5 ......c2n
Max complexity of algo should be O(n)
Do it without using extra storage
这题可以O(n)吗?
g***s
发帖数: 30
48
来自主题: JobHunting版 - 问个amazon面试题
int [] rearrange(int [] k) {
if (k == null || k.length < 3)
return k;
int [] n = new int[size_t];
for (int i = 0; i < k.length; i++) {
if (i%2 == 1) {
n[i] = k[i/2];
}
else {
n[i] = k[k.length / 2 + i/2];
}
}
return n;
}
g*********e
发帖数: 14401
49
does any one have idea of how to avoid having indian interviewers?
tell the hr to rearrange schedule?
z****u
发帖数: 241
50
来自主题: JobHunting版 - 请问面试时间冲突了怎么办?
Congratulations for the multi interview opportunities.
适当的引入竞争机制,可以增加你的价值.可以帮助加速hiring process.
I have students handled very well in this kind of situation.
Let the other party know your schedule is conflicted due to another
interview, not need disclose the company name, ask them to rearrange.
Good luck!
首页 上页 1 2 3 4 5 6 7 下页 末页 (共7页)