Letter-Value Plots for Large Datasets With boxenplot
Ironbark Manufacturing's high-volume lines produce so many measurements that a plain box chart marks hundreds of parts as unusual and shows nothing about them. The chart used instead draws nested boxes reaching further and further into the tails, so the shape of the extremes is visible rather than reduced to a cloud of dots. The report quotes the two figures those outer boxes reach.
Task: Print the lower and upper tail cut-offs.
Input
The first line holds one integer n, the number of measurements. Each of the next n lines holds one measurement, a number on its own.
Output
One line holding two numbers separated by a single space: the measurement a tenth of the way up the sorted list, then the one nine tenths of the way up. Each carries exactly two decimal places. When a cut-off falls between two measurements it is taken by sliding evenly between them, so ten measurements of 1 to 10 give 1.90 and 9.10 rather than 1 and 9.
Example:
Input:
10
1
2
3
4
5
6
7
8
9
10
Output:
1.90 9.10
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in