Package net.projecteuler.model.Tree

Examples of net.projecteuler.model.Tree.Row


    }
  }

  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);
    }
  }
View Full Code Here

TOP

Related Classes of net.projecteuler.model.Tree.Row

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.