Python/project_euler
Dhruv 29b32d3553
Improve validate solutions script & fix pre-commit error (#3253)
* Trying to time every solution

* Proposal 2 for timing PE solutions:

- Use pytest fixture along with --capture=no flag to print out the
  top DURATIONS slowest solution at the end of the test sessions.
- Remove the print part and try ... except ... block from the test
  function.

* Proposal 3 for timing PE solutions:

Completely changed the way I was performing the tests. Instead of
parametrizing the problem numbers and expected output, I will
parametrize the solution file path.

Steps:
- Collect all the solution file paths
- Convert the paths into a Python module
- Call solution on the module
- Assert the answer with the expected results

For assertion, it was needed to convert the JSON list object to
Python dictionary object which required changing the JSON file itself.

* Add type hints for variables

* Fix whitespace in single_qubit_measure
2020-10-13 15:41:12 +05:30
..
problem_01 Cleanup Project Euler Problem 01 (#2900) 2020-10-10 11:03:00 +05:30
problem_02 Hacktoberfest 2020: Apply style guidelines for Project Euler problem_02 (#2898) 2020-10-06 10:04:16 +05:30
problem_03 Hacktoberfest 2020: Add style improvements for Project Euler Problem 03 (#2917) 2020-10-06 20:24:39 +05:30
problem_04 Add style improvements to solutions for Project Euler Problem 04 (#2945) 2020-10-07 10:33:34 +05:30
problem_05 Add type hints and default args for Project Euler problem 5 (#2982) 2020-10-08 08:50:11 +05:30
problem_06 Add default arguments for Project Euler problem 6 (#2957) 2020-10-07 10:17:43 +05:30
problem_07 Add default args and type hints for problem 7 (#2973) 2020-10-08 07:57:47 +02:00
problem_08 Add style improvements to Project Euler problem 8 (#3001) 2020-10-08 09:21:17 +05:30
problem_09 Add style improvements to Project Euler problem 9 (#3046) 2020-10-08 16:51:32 +05:30
problem_10 Project Euler Problem 10: style improvements (#2924) 2020-10-06 17:48:07 +05:30
problem_11 Fix docstring for Euler problem 11, solution 1 (#3228) 2020-10-12 19:44:45 +05:30
problem_12 psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
problem_13 [Project Euler] Fix code style for multiple problems (#3094) 2020-10-10 21:23:17 +05:30
problem_14 [Project Euler] Added type hints and refactored the code for Problem 14 (#3047) 2020-10-09 08:33:23 +05:30
problem_15 [Project Euler] Fix code style for problems 15 and 34 (#3076) 2020-10-09 08:46:55 +05:30
problem_16 Coding style improvements for project_euler problem 45 & 16 (#3087) 2020-10-09 12:09:44 +05:30
problem_17 [Project Euler] Fix code style for multiple problems (#3094) 2020-10-10 21:23:17 +05:30
problem_18 Add __init__.py files in all the directories (#2503) 2020-09-28 19:42:36 +02:00
problem_19 Fixes for issue "Fix the LGTM issues #1024" (#1034) 2019-07-18 19:05:14 +02:00
problem_20 Add type hints and default args for problem 20 (#2962) 2020-10-07 17:59:55 +08:00
problem_21 [Project Euler] Fix code style for multiple problems (#3094) 2020-10-10 21:23:17 +05:30
problem_22 pyupgrade --py37-plus **/*.py (#1654) 2020-01-03 22:25:36 +08:00
problem_23 Add __init__.py files in all the directories (#2503) 2020-09-28 19:42:36 +02:00
problem_24 Added doctest and more explanation about Dijkstra execution. (#1014) 2019-07-17 01:09:53 +02:00
problem_25 Add typehints and default input for project_euler/problem_25 (#2901) 2020-10-07 09:27:25 +05:30
problem_26 Style Improvements for project_euler/problem_26 (#2958) 2020-10-08 08:52:24 +05:30
problem_27 Coding style with default argument for project_euler problem 27 (#3020) 2020-10-08 16:53:00 +05:30
problem_28 Update code style for Project Euler Problem 28 (#2976) 2020-10-07 18:35:06 +05:30
problem_29 Bring problem_29 solution in line with project style guidelines (#2949) 2020-10-07 08:33:03 +05:30
problem_30 Bring problem_30 solution in line with project style guidelines (#2896) 2020-10-06 08:21:39 +05:30
problem_31 [Project Euler] Fix code style for multiple problems (#3094) 2020-10-10 21:23:17 +05:30
problem_32 Add __init__.py files in all the directories (#2503) 2020-09-28 19:42:36 +02:00
problem_33 [Project Euler] Fix code style for multiple problems (#3094) 2020-10-10 21:23:17 +05:30
problem_34 [Project Euler] Fix code style for problems 15 and 34 (#3076) 2020-10-09 08:46:55 +05:30
problem_35 Coding style change for project_euler problem 36 and 35 (#3062) 2020-10-09 08:35:13 +05:30
problem_36 Coding style change for project_euler problem 36 and 35 (#3062) 2020-10-09 08:35:13 +05:30
problem_37 Add solution method for project_euler/problem_37 (#2998) 2020-10-08 09:27:14 +05:30
problem_39 Fix coding style for Project Euler problem 39 (#3023) 2020-10-09 08:13:54 +05:30
problem_40 pyupgrade --py37-plus **/*.py (#1654) 2020-01-03 22:25:36 +08:00
problem_41 [Project Euler] Fix code style in Problem 41 (#2992) 2020-10-08 13:57:07 +05:30
problem_42 Add __init__.py files in all the directories (#2503) 2020-09-28 19:42:36 +02:00
problem_43 [Project Euler] Fix code style for multiple problems (#3094) 2020-10-10 21:23:17 +05:30
problem_44 [Project Euler] Fix code style for multiple problems (#3094) 2020-10-10 21:23:17 +05:30
problem_45 Coding style improvements for project_euler problem 45 & 16 (#3087) 2020-10-09 12:09:44 +05:30
problem_46 [Project Euler] Fix code style for multiple problems (#3094) 2020-10-10 21:23:17 +05:30
problem_47 Only one carriage return (#2155) 2020-06-25 19:15:30 +02:00
problem_48 Update sol1.py (#2455) 2020-09-20 21:33:26 +02:00
problem_49 Add a solution for Project Euler 49 (#2702) 2020-10-05 08:27:09 +05:30
problem_51 Add project euler problem 51 (#3018) 2020-10-12 22:40:29 +05:30
problem_52 Added doctest and more explanation about Dijkstra execution. (#1014) 2019-07-17 01:09:53 +02:00
problem_53 pyupgrade --py37-plus **/*.py (#1654) 2020-01-03 22:25:36 +08:00
problem_54 Add solution() for problem 54 of Project Euler (#2472) 2020-09-24 15:16:55 +02:00
problem_55 [Project Euler] Fix code style in Problem 55 (#2985) 2020-10-07 20:39:36 +05:30
problem_56 [Project Euler] Fix code style for problem 56 (#3050) 2020-10-08 19:07:09 +05:30
problem_63 [Project Euler] Fix code style for multiple problems (#3094) 2020-10-10 21:23:17 +05:30
problem_67 psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
problem_69 Added solution to Project Euler 69 (#2934) 2020-10-11 23:38:30 +05:30
problem_71 Add Project Euler Problem 71: Fixes #2695 (#2785) 2020-10-08 19:55:23 +08:00
problem_72 Add a solution to Project Euler 72 (#2940) 2020-10-12 19:46:15 +05:30
problem_76 Address #2786 - Fix code style in Project Euler Problem 76 (#2978) 2020-10-07 19:08:02 +05:30
problem_80 Add Project Euler Problem 80 (#2885) 2020-10-10 17:06:25 +05:30
problem_97 Created problem_97 in project euler (#2476) 2020-09-25 11:52:19 +02:00
problem_99 Hacktoberfest 2020: Rename method for project_euler/problem_99 (#2981) 2020-10-07 20:46:11 +05:30
problem_112 Created problem_112.py in project_euler (#2532) 2020-10-03 16:38:56 +08:00
problem_119 Added solution for Project Euler problem 119 (#2931) 2020-10-10 23:29:02 +05:30
problem_120 Add Project Euler 120 solution (#2887) 2020-10-06 08:41:15 +05:30
problem_125 Added solution for Project Euler problem 125 (#3073) 2020-10-09 22:41:00 +05:30
problem_191 Add solution for Project Euler problem 191 (#2875) 2020-10-11 17:59:27 +05:30
problem_234 Fixes: #3163 - Add new solution for problem 234 (#3177) 2020-10-11 23:16:16 +05:30
problem_551 [Project Euler] Fix code style for multiple problems (#3094) 2020-10-10 21:23:17 +05:30
__init__.py Add __init__.py files in all the directories (#2503) 2020-09-28 19:42:36 +02:00
project_euler_answers.json Improve validate solutions script & fix pre-commit error (#3253) 2020-10-13 15:41:12 +05:30
README.md fixed project eular readme (#1391) 2019-10-18 23:52:32 +02:00
validate_solutions.py Improve validate solutions script & fix pre-commit error (#3253) 2020-10-13 15:41:12 +05:30

ProjectEuler

Problems are taken from https://projecteuler.net/.

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Project Euler is ideal for mathematicians who are learning to code.

Here the efficiency of your code is also checked. I've tried to provide all the best possible solutions.

For description of the problem statements, kindly visit https://projecteuler.net/show=all