Updated for performance

This commit is contained in:
2020-06-17 17:39:37 -04:00
parent e18591046e
commit 98cdcff9a6

View File

@@ -1,11 +1,11 @@
//ProjectEuler/Java/Problem24.java
//ProjectEulerJava/src/main/java/mattrixwv/ProjectEuler/Problems/Problem24.java
//Matthew Ellison
// Created: 03-24-19
//Modified: 03-28-19
//Modified: 06-17-20
//What is the millionth lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9?
//Unless otherwise listed all non-standard includes are my own creation and available from https://bibucket.org/Mattrixwv/JavaClasses
/*
Copyright (C) 2019 Matthew Ellison
Copyright (C) 2020 Matthew Ellison
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -30,7 +30,7 @@ import java.util.ArrayList;
public class Problem24 extends Problem{
//The number of the permutation I need
private static final Integer NEEDED_PERM = 1000000; //The number of the permutation that you need
private static final int NEEDED_PERM = 1000000; //The number of the permutation that you need
public Problem24(){
super("What is the millionth lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9?");
@@ -55,5 +55,5 @@ public class Problem24 extends Problem{
/* Results
The 1 millionth permutation is 2783915460
It took 1.844 seconds to solve this problem.
It took 1.650 seconds to solve this problem.
*/