* kth order statistics divide and conquer algorithm
* add explanation of algorithm.
* fix PEP8 line too long error
* update order to be compliant to isort
* add doctest
* make file black compliant
* Added solution to Project Euler problem 301
* Added newline to end of file
* Fixed formatting and tests
* Changed lossCount to loss_count
* Fixed default parameter value for solution
* Removed helper function and modified print stmt
* Fixed code formatting
* Optimized solution from O(n^2) to O(1) constant time
* Update sol1.py
* add type hints to math/gcd
* add doctest
* math/gcd - run black formatter
* math/gcd: remove manual doctest
* add correction to gcd of negative numbers
* add more doctest in iterative gcd
* add solution to Project Euler problem 206
* Add solution to Project Euler problem 205
* updating DIRECTORY.md
* updating DIRECTORY.md
* Revert "Add solution to Project Euler problem 205"
This reverts commit 64e3d36cab.
* Revert "add solution to Project Euler problem 206"
This reverts commit 53568cf4ef.
* add solution for project euler problem 207
* updating DIRECTORY.md
* add type hint for output of helper function
* Correct default parameter value in solution
* use descriptive variable names and remove problem solution from doctest Fixes: #2695
Co-authored-by: nico <esistegal-aber@gmx.de>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Implement the melkman anlgorithm for computing convex hulls
* Link melkman algorithm description
* Format melkman algorithm code
* Add type hints to functions
* Fix build errors
* 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