Skip to content

Commit 116151b

Browse files
authored
added definition of median
1 parent 7f029ff commit 116151b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ The countries of the world have many different defining attributes including lan
2121
Note: the sort method must work with `int` - so not `long`. the solution - type casting! See the code snippet below:
2222
`.sort((c1, c2) -> (int)(c1.getPopulation() - c2.getPopulation()))`
2323

24+
Note: to calculate median for stretch goals - if the list contains an odd number of items, pick the the middle one. If the list contains an even number of items, pick either of the two items that lie in the middle.
2425

2526
* The following URLs should return the requested data given the parameters
2627
* /names/all

0 commit comments

Comments
 (0)