Updated problems to be more in line with conventions

This commit is contained in:
2020-06-19 19:58:36 -04:00
parent 1bfd097fa3
commit 7d107c1071
31 changed files with 174 additions and 182 deletions

View File

@@ -1,11 +1,11 @@
--ProjectEuler/lua/Problem24.lua
--Matthew Ellison
-- Created: 03-24-19
--Modified: 03-28-19
--Modified: 06-19-20
--What is the millionth lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9?
--All of my requires, unless otherwise listed, can be found at https://bitbucket.org/Mattrixwv/luaClasses
--[[
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
@@ -29,14 +29,14 @@ NEEDED_PERM = 1000000; --The number of the permutation that you need
--Setup the variables
timer = Stopwatch:create();
nums = "0123456789";
local timer = Stopwatch:create();
local nums = "0123456789";
--Start the timer
timer:start();
--Get all permutations of the string
permutations = getPermutations(nums);
local permutations = getPermutations(nums);
--Stop the timer
timer:stop();