Practice: Sorting
0 of 4 solved
About these problems
Apply, Connect, Reason and Stretch describe difficulty within this topic, not an official contest rating. Open any problem in any order; reading the chapter first is optional.
- 1Ordered readingsPrint the input values in nondecreasing order.ApplyNot started
- 2Results orderEach participant has a distinct integer id and a score. Print ids by decreasing score; equal scores are ordered by increasing id.ConnectNot started
- 3Closest readingsFind the smallest absolute difference between values at two different positions.ReasonNot started
- 4Compact coordinatesReplace every array value by its rank among the distinct values in increasing order. Ranks start at 1; equal values receive equal ranks. Print ranks in the original input order.StretchNot started