h*********3 发帖数: 111 | 1 career cup 上的.
* Given an array of integers A, give an algorithm to find the longest
Arithmetic progression in it, i.e find a sequence i1 < i2 < … < ik, such
that
A[i1], A[i2], …, A[ik] forms an arithmetic progression, and k is the
largest possible. The sequence S1, S2, …, Sk is called an arithmetic
progression if
Sj+1 – Sj is a constant
* Given a list of points in the plane, write a program that outputs each
point along with the three other points that are closest to it. These three
points ordered by distance.
* Given N students, find the number of ways the students could be ranked.
Also one or more students can have ties and can have the same ranks.
* Given an array of integers where some numbers repeat 1 time, some numbers
repeat 2 times and only one number repeats 3 times, how do you find the
number that repeat 3 times. | g*********s 发帖数: 1782 | 2 career cup more and more bt now...
three
【在 h*********3 的大作中提到】 : career cup 上的. : * Given an array of integers A, give an algorithm to find the longest : Arithmetic progression in it, i.e find a sequence i1 < i2 < … < ik, such : that : A[i1], A[i2], …, A[ik] forms an arithmetic progression, and k is the : largest possible. The sequence S1, S2, …, Sk is called an arithmetic : progression if : Sj+1 – Sj is a constant : * Given a list of points in the plane, write a program that outputs each : point along with the three other points that are closest to it. These three
|
|