Home » Java » Median in 500GB file java

Median in 500GB file java

Posted by: admin August 11, 2018 Leave a comment

Questions:

Find median of all numbers in the given 500GB file at the command prompt.

File format eg:

12 
4
98
3

with one number in each line(numbers can be repeated).Can anyone please help on how to approach on this in JAVA?
if we have to split the file and then how can median be calculated?
I have come across several posts on median but couldn’t find best approach on such huge file .

Answers: