* Made improvements to combinations.py
* Update maths/combinations.py
Co-authored-by: Du Yuanchao <shellhub.me@gmail.com>
* Function now raises an error when given invalid input
* Update maths/combinations.py
Co-authored-by: Du Yuanchao <shellhub.me@gmail.com>
* Update CONTRIBUTING.md
Needed to tell people so we do not receive any duplicate solution. Do not count this as hactoberfest-accepted
* Update CONTRIBUTING.md
* Update CONTRIBUTING.md
typo fix
Co-authored-by: Du Yuanchao <shellhub.me@gmail.com>
* Update CONTRIBUTING.md
Co-authored-by: Du Yuanchao <shellhub.me@gmail.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Fix style of the first ten solutions for Project Euler
- Unify the header docstring, and add reference URLs to wikipedia
or similar
- Fix docstrings to be properly multilined
- Add newlines where appropriate
- Add doctests where they were missing
- Remove doctests that test for the correct solution
- fix obvious spelling or grammar mistakes in comments and
exception messages
- Fix line endings to be UNIX. This makes two of the files seem
to have changed completely
- no functional changes in any of the solutions were done
(except for the spelling fixes mentioned above)
* Fix docstrings and main function as per Style Guide
* add forecasting code
* add statsmodel
* sort import
* sort import fix
* fixing black
* sort requirement
* optimize code
* try with limited data
* sort again
* sort fix
* sort fix
* delete warning and black
* add code for forecasting
* use black
* add more hints to describe
* add doctest
* finding whitespace
* fixing doctest
* delete
* revert back
* revert back
* revert back again
* revert back again
* revert back again
* try trimming whitespace
* try adding doctypeand etc
* fixing reviews
* deleting all the space
* fixing the build
* delete x
* add description for safety checker
* deleting subscription integer
* fix docthint
* make def to use function parameters and return values
* make def to use function parameters and return values
* type hints on data safety checker
* optimize code
* Update run.py
Co-authored-by: FVFYK3GEHV22 <fvfyk3gehv22@FVFYK3GEHV22s-MacBook-Pro.local>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added solution for Project Euler problem 38. Fixes: #2695
* Update docstring and 0-padding in directory name. Reference: #3256
* Renamed is_9_palindromic to is_9_pandigital.
* Changed just-in-case return value for solution() to None.
* Moved exmplanation to module-level docstring and deleted unnecessary import
* Add solution for Project Euler 65,
* Add URL to problem 65 and don't pass in parameter to solution()
* Remove solution() tests
* Add tests for solution(), add fstring and positional arg for solution
* Rename directory and problem number to 065
* Remove directory
* Move up explanation to module code block
* Move solution() below helper function, rename variables
* update doubly linked list
* reformat code
add more test
* add test to iter
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Create medianOf TwoArrays.py
This code finds the median of two arrays (which may or may not be sorted initially).
Example:
Enter elements of an array: 1 5 4 2
Enter elements of another array: 1 7 4 2 7
The median of two arrays is : 4
* Rename medianOf TwoArrays.py to median_of _two_arrays.py
* Rename median_of _two_arrays.py to median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Update median_of_two_arrays.py
* Add naive recursive implementation of 0-1 Knapsack problem
* Fix shadowing
* Add doctest
* Fix type hints
* Add link to wiki
* Blacked the file
* Fix isort
* Move knapsack / add readme and more tests
* Add missed main in tests
* Add Patience Sort
* fix code for pre-commit
* Fix params def
* Adding new line at end of file
* Remove Trailing Whitespace
* Adding space between the methods of the Stack class
* Removing Trailing Whitespace
* Ordering Imports
* Adding url patience sort
Co-authored-by: jvnascimento <nascimento783@gmail.com>
* create beaufort cipher
if you like my code, merge it and add the label as `hacktoberfest-accepted`
* update the file
* Update beaufort_cipher.py
* Update beaufort_cipher.py
* update as per black formatter
* Update beaufort_cipher.py
* update the file
* update file
* update file
* update file
* update file
* Add GitHub action for Project Euler only
* Add second job for Project Euler
* Remove Project Euler jobs from Travis CI
* Fix typo for actions/setup-python
* Rename the workflow file
* Change name of file in workflow
* Remove comments from Travis config file
* Create evaluate_postfix_notations.py
Adding in the evaluate postfix notation using Stacks
one of the common use with simple stack question
creating a new file for the data structure of stacks
* Create evaluate_postfix_notations.py
Adding in the evaluate postfix notation using Stacks
one of the common use with simple stack question
creating a new file for the data structure of stacks
* Delete evaluate_postfix_notations.py
* Evaluate postfix expression stack clean approach
Sending in the PR again as the Previous request failed in pre commit
* Update evaluate_postfix_notations.py
* Update evaluate_postfix_notations.py
Made changes as per the required for fixing the failing pre-commits.
* Update evaluate_postfix_notations.py
Made changes as suggested by @cclauss
* Update evaluate_postfix_notations.py
fixed pre-commit fails
* Update evaluate_postfix_notations.py
fixing pre-commit fails
* Update evaluate_postfix_notations.py
Deleted trailing white spaces causing pre-commits to fail
* Update data_structures/stacks/evaluate_postfix_notations.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update data_structures/stacks/evaluate_postfix_notations.py
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* include solution for problem 57
* fix line to long errors
* update filenames and code to comply with new regulations
* more descriptive local variables
* Added solution for Project Euler problem 75.
* Added doctest for solution() in project_euler/problem_75/sol1.py
* Update docstring and 0-padding of directory name. Reference: #3256
* More descriptive variable names
* Moved solution explanation to module-level docstring
* Added solution for Project Euler problem 72.
* Update type annotations and 0-padding of the directory name. Reference: #3256
* Rename sol1.py to sol2.py
* Added newline at the end of sol2.py
* Revert sol1.py
* graphs/kruskal: add doctest & type hints
this is a child of a previous PR #2443
its ancestor is #2128
* updating DIRECTORY.md
* graphs/kruskal: fix max-line-length violation
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added solution for Project Euler problem 74. Fixes: #2695
* Added doctest for solution() in project_euler/problem_74/sol1.py
* Update docstrings and 0-padding of directory name. Reference: #3256