Write a partition algorithm employed in qsort. Analyze time cost in bad, good, mean cases.
Given a array, find there elements that a[i]+a[j]+a[k] == target. Explain why this algorithm works.
Write a algorithm to print all the permuations of a array.
Variable-width string encoding. while the first bit equals 0, this character is a one Byte character. When the first bit equals 1, this character is a two Byte character. Given a legal position, find its previous legal character.
how to find median in mass data.
some points are scattered, find a line to seperate them and keeps point counts in each plane equals.
[3, 4, 5, 6, 7, 4, 3, 2], find median of such array.
median of two sorted array.
design a lottery system
Some onsite algorithm questions
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
- 文/潘曉璐 我一進店門锋拖,熙熙樓的掌柜王于貴愁眉苦臉地迎上來诈悍,“玉大人,你說我怎么就攤上這事兽埃〗那” “怎么了?”我有些...
- 文/不壞的土叔 我叫張陵柄错,是天一觀的道長慕趴。 經(jīng)常有香客問我,道長鄙陡,這世上最難降的妖魔是什么冕房? 我笑而不...
- 正文 為了忘掉前任,我火速辦了婚禮趁矾,結果婚禮上耙册,老公的妹妹穿的比我還像新娘。我一直安慰自己毫捣,他們只是感情好详拙,可當我...
- 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著蔓同,像睡著了一般饶辙。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上斑粱,一...
- 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼快骗!你這毒婦竟也來了娜庇?” 一聲冷哼從身側響起塔次,我...
- 正文 年R本政府宣布羔砾,位于F島的核電站,受9級特大地震影響偶妖,放射性物質發(fā)生泄漏姜凄。R本人自食惡果不足惜,卻給世界環(huán)境...
- 文/蒙蒙 一趾访、第九天 我趴在偏房一處隱蔽的房頂上張望态秧。 院中可真熱鬧,春花似錦扼鞋、人聲如沸申鱼。這莊子的主人今日做“春日...
- 文/蒼蘭香墨 我抬頭看了看天上的太陽捐友。三九已至,卻和暖如春溃槐,著一層夾襖步出監(jiān)牢的瞬間匣砖,已是汗流浹背。 一陣腳步聲響...
推薦閱讀更多精彩內容
- 這次月考監(jiān)場趕上的是倒數(shù)第二考場培慌,差不多就是本年級學習最差的學生了。因為倒數(shù)第一場有些是上次缺考的柑爸,故而這屋里的4...