Skip to content

Latest commit

 

History

History
5 lines (4 loc) · 505 Bytes

File metadata and controls

5 lines (4 loc) · 505 Bytes

The-lowest-sorting-effort-of-an-array-with-non-equal-variables

The program which take the length of array, reference array, input array and values of variables in the input array. It counts the lowest effort to sort the input array according to the reference array. The way of sorting is changing places of two single variables. The cost of the single changing is the sum of values of each variable.

The input is a four-line file with values separated by a space, run by command: program.py < text.txt