All Algorithms implemented in Python the-algorithms.com/
Go to file
Ashley Jeji George 799fde4c07
Update linear_search.py (#2422)
* Update linear_search.py

Python implementation of recursive linear search algorithm

* Update linear_search.py

Added different doctests
Added the parameter hints
Handled the exception

* Update linear_search.py

added parameter hints to linear_search

* Update linear_search.py

Both the functions return the index if the target is found and -1 if it is not found
The rec_linear_search raises an exception if there is an indexing problem
Made changes in the doc comments

* Update linear_search.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-09-14 12:44:46 +02:00
.github isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
arithmetic_analysis Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
backtracking Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
bit_manipulation Added binery_or_operator.py to bit manipulation file (#2331) 2020-08-27 09:09:42 +02:00
blockchain Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
boolean_algebra Tabs --> spaces in quine_mc_cluskey.py (#1426) 2019-11-21 22:21:40 +08:00
cellular_automata Blacken one_dimensional.py (#1911) 2020-04-27 18:40:46 +02:00
ciphers Fix some warnings from LGTM (#2420) 2020-09-13 10:11:27 +02:00
compression isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
computer_vision isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
conversions Renamed files and fixed Doctest (#2421) 2020-09-13 13:27:20 +02:00
data_structures Updated Stack (#2414) 2020-09-13 13:56:03 +02:00
digital_image_processing Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
divide_and_conquer Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
dynamic_programming Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
file_transfer Renamed files and fixed Doctest (#2421) 2020-09-13 13:27:20 +02:00
fuzzy_logic isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
genetic_algorithm Add a missing "genetic algorithm" folder with a basic algorithm inside (#2179) 2020-07-07 12:46:09 +02:00
geodesy isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
graphics isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
graphs Renamed files and fixed Doctest (#2421) 2020-09-13 13:27:20 +02:00
greedy_method isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
hashes Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
images Add Travis_CI_tests_are_failing.md (#1499) 2019-10-28 13:38:08 +01:00
linear_algebra Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
machine_learning Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
maths Fix some warnings from LGTM (#2420) 2020-09-13 10:11:27 +02:00
matrix Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
networking_flow Tighten up psf/black and flake8 (#2024) 2020-05-22 08:10:11 +02:00
neural_network isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
other Fix some warnings from LGTM (#2420) 2020-09-13 10:11:27 +02:00
project_euler Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
quantum Update README.md (#1842) 2020-04-07 23:56:21 +02:00
scheduling Fix some warnings from LGTM (#2420) 2020-09-13 10:11:27 +02:00
scripts isort --profile black . (#2181) 2020-07-06 09:44:19 +02:00
searches Update linear_search.py (#2422) 2020-09-14 12:44:46 +02:00
sorts Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
strings Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
traversals Optimized recursive_bubble_sort (#2410) 2020-09-10 10:31:26 +02:00
web_programming recaptchaVerification (#2417) 2020-09-13 22:26:15 +02:00
.coveragerc Add pytest-cov (#1578) 2019-11-17 19:37:58 +01:00
.gitignore contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
.gitpod.yml Change gitpod configuration for python3. (#1827) 2020-04-07 12:20:08 +02:00
.travis.yml Travis CI: Identify our ten slowest pytests (#2350) 2020-08-25 15:47:06 +02:00
CONTRIBUTING.md Update CONTRIBUTING.md (#2378) 2020-08-31 21:34:44 +02:00
DIRECTORY.md Updated Stack (#2414) 2020-09-13 13:56:03 +02:00
LICENSE.md Update year in LICENSE.md (#1848) 2020-04-13 02:17:29 +02:00
pytest.ini Add pytest init file to define custom mark mat_ops (#2120) 2020-06-15 18:09:32 +02:00
README.md Fix psf/black issues than fail the build (#1935) 2020-05-03 23:58:44 +02:00
requirements.txt file-transfer: writing tests and ensuring that all is going well (#2413) 2020-09-11 23:13:43 +02:00
Travis_CI_tests_are_failing.md Add Travis_CI_tests_are_failing.md (#1499) 2019-10-28 13:38:08 +01:00

The Algorithms - Python

Gitpod Ready-to-Code Gitter chat  Build Status  LGTM  contributions welcome  Donate   

All algorithms implemented in Python (for education)

These implementations are for learning purposes. They may be less efficient than the implementations in the Python standard library.

Contribution Guidelines

Read our Contribution Guidelines before you contribute.

Community Channel

We're on Gitter! Please join us.

List of Algorithms

See our directory.