}
}
private void writeSolution(Index index, long sum) {
if (index != null) {
Row row = tree.getRow(index.getRow());
for(int i = 100 - index.getRow(); i > 0; i-- )
solution.print(" ");
for (int col = 0; col < row.size(); col++) {
if (col == index.getCol())
solution.print(String.format("(%02d)", row.valueAt(col)));
else
solution.print(String.format(" %02d ", row.valueAt(col)));
if (col < row.size() - 1)
solution.print(" ");
}
solution.println(" => " + sum);
}
}