Transportation problem: Difference between revisions

Content added Content deleted
(→‎{{header|Java}}: added some comments)
m (Added to the D versions some comments from the Java version.)
Line 591:
Shipment[] stones = chain([s], matrixToSeq(matrix)).array;
 
// Remove (and keep removing) elements that do not have
// a vertical AND horizontal neighbor.
while (true) {
auto stones2 = stones.remove!((in e) {
Line 602 ⟶ 604:
}
 
// Place the remaining elements in the correct plus-minus order.
auto stones3 = stones.dup;
Shipment prev = s;