Java – ClosestPair Solved

$ 19.99
Category:

Description

The data file “Heights.txt” contains the heights of students in a class in centimeters (one height per line, each height expressed as a double). Write a program that reads the numbers in this file into an ArrayList and finds the pair of numbers that are closest to each other. The program should print out which two numbers are closest and what their difference is. It should work for any file containing a number on each line (as an example the file “Weights.txt” will also be used for grading).

Reviews

There are no reviews yet.

Be the first to review “Java – ClosestPair Solved”

Your email address will not be published. Required fields are marked *