I have an array of String like so:
array[0] = "1 4"
array[1] = "2 0"
array[2] = "2 1"
array[3] = "4 2"
and would like to process the array and print out the second part of the array element
on the same line when the first part of the array element have duplicates, like this:
4
0 1
2
I’ve been trying ages to work this out but I keep getting more confused…
Processing is based on consecutive lines.
It looks like a straight-forward Java coding problem to me:
This assumes that your input file is ordered on the first field …