Problem Statement | |||||||||||||
Given a int[] x and a percentile p (between 0 and 100, inclusive), find the smallest element y in x such that at least p percent of the elements in x are less than or equal to y. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | x will contain between 1 and 50 elements, inclusive. | ||||||||||||
- | Each element of x will be between -1000000 and 1000000, inclusive. | ||||||||||||
- | p will be between 0 and 100, inclusive. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
| |||||||||||||
4) | |||||||||||||
|