-
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
网友评论