Commit Graph

2092 Commits

Author SHA1 Message Date
Sven Efftinge
aeab9f1068 Added gitpod info () 2019-05-31 16:02:56 +08:00
cedricfarinazzo
9037abae11 Fix spelling in neural_network/convolution_neural_network.py ()
* Fix spelling in neural_network/convolution_neural_network.py

* fix import

Signed-off-by: cedric.farinazzo <cedric.farinazzo@epita.fr>
2019-05-30 08:47:00 +08:00
Erfan Alimohammadi
fc95e7a91a Fermat's little theorem ()
* Fix typo

* Add fermat's little theorem

* Update fermat_little_theorem.py

* Fix comments

* Add Wikipedia reference
2019-05-28 20:51:48 +08:00
alpylmz
dd62f1b802 Create sol5.py ()
added a solve for the problem
2019-05-26 23:34:49 +05:30
Anup Kumar Panwar
f56dd7f8e3
Update Atbash.py 2019-05-26 22:59:07 +05:30
Anup Kumar Panwar
cb4be75941
Rename nqueens.py to n_queens.py 2019-05-26 22:21:22 +05:30
victoni
559951c181 Lucas series added () 2019-05-26 22:12:55 +05:30
Bruno Santos
89f15bef0a Create prim.py () 2019-05-26 22:11:46 +05:30
Shubhayu Das
5be32f4022 Add files via upload () 2019-05-26 22:10:04 +05:30
Ambuj81
7f4f565e62 subset_generation ()
* subset_generation

generate all possible subset of size n of a given array of size r

* Rename subset_generation to subset_generation.py

* Update subset_generation.py

I made all changes I could  . What I mean is I removed all the empty space ....... 
There some comment extra if you feel removing those comments please do so yourself pls provide spacing as it should be

* Create morse_Code_implementation.py

* Any more changes pls let me know
2019-05-26 22:07:40 +05:30
CHIANGTUNGHUA
974088d872 Update .gitignore () 2019-05-26 22:03:53 +05:30
Anup Kumar Panwar
71be23999c refactor 2019-05-26 21:56:10 +05:30
Ayman Mohamed Ali
3033c1e06e Implement check_bipartite_graph using DFS. () 2019-05-26 18:16:45 +05:30
Anup Kumar Panwar
23938708ac
Update README.md 2019-05-26 17:11:41 +05:30
Artyom Belousov
94380a17a8 Added treap ()
* Added treap

* Added comments to treap
2019-05-26 06:20:37 +08:00
Mehdi ALAOUI
02c0daf9e5 Adding unit tests for sorting functions, and improving readability on some sorting algorithms ()
* Adding variable to fade out ambiguity

* More readability on merge sorting algorithm

* Updating merge_sort_fastest description and explaining why

* Adding tests file with imports

* Standardazing filenames and function names

* Adding test cases and test functions

* Adding test loop

* Putting 'user oriented code' inside main condition for having valid imports

* Fixing condition

* Updating tests: adding cases and todo list

* Refactoring first euler problem's first solution
2019-05-25 21:41:24 +08:00
José Henrique Ivanchechen
9f982a83c8 add pigeon hole sort () 2019-05-24 22:46:39 +05:30
BruceLee569
a0ab3ce098 Update quick_sort.py ()
Modify the list comprehensions to reduce the number of judgments, the speed has increased by more than 50%.
2019-05-24 23:54:03 +08:00
Níkolas Vargas
023f5e092d fix empty list validation and code data structures ()
* fix empty list validation and code data structures

* Update bucket_sort.py

https://github.com/TheAlgorithms/Python/pull/826#pullrequestreview-240357549
2019-05-22 20:09:36 +08:00
Anirudh Ajith
b5667e5ee9 Removed the (incorrectly named) redundant file graph_list.py and renamed graph.py to graph_list.py () 2019-05-21 14:06:05 +08:00
Adam
c1130490d7 fix spelling on line 44 of bucket sort ()
* change besd to best
2019-05-20 21:22:20 +08:00
DaveAxiom
316d5ffa37 Add NQueens backtracking search implementation () 2019-05-20 04:36:46 +08:00
Andy Lau
f5abc04176 Update bucket_sort.py ()
* Some simplification
2019-05-19 17:00:54 +08:00
weixuanhu
b6c3fa8992 Interpolation search - fix endless loop bug, divide 0 bug and update description ()
* fix endless loop bug, divide 0 bug and update description

fix an endless bug, for example, if collection = [10,30,40,45,50,66,77,93], item = 67.

fix divide 0 bug,  when right=left it is not OK to point = left + ((item - sorted_collection[left]) * (right - left)) // (sorted_collection[right] - sorted_collection[left])

update 'sorted' to 'ascending sorted' in description to avoid confusion

* delete swap files

* delete 'address' and add input validation
2019-05-18 10:59:12 +08:00
Sarvesh Dubey
f3608acfd5 Created shortest path using bfs ()
* Created shortest path using bfs
2019-05-17 11:12:06 +08:00
cclauss
5b86928c4b Use ==/!= to compare str, bytes, and int literals ()
* Travis CI: Add more flake8 tests

* Use ==/!= to compare str, bytes, and int literals

./project_euler/problem_17/sol1.py:25:7: F632 use ==/!= to compare str, bytes, and int literals
			if i%100 is not 0:
      ^

* Use ==/!= to compare str, bytes, and int literals

* Update sol1.py
2019-05-16 19:26:46 +08:00
Erfan Alimohammadi
a65efd42c4 Implement check_bipartite_graph using DFS. () 2019-05-16 19:24:56 +08:00
ImNandha
13c0c166d8 Update graph.py () 2019-05-16 19:23:23 +08:00
Níkolas Vargas
c47c1ab03c enhancement () 2019-05-16 19:20:42 +08:00
Reshad Hasan
76061ab2cc added eulerian path and circuit finding algorithm () 2019-05-16 19:20:27 +08:00
Erfan Alimohammadi
c4d16820bc
Fix typo () 2019-05-14 21:45:53 +04:30
Tommy.Liu
3c40fda6a3 More elegant coding for merge_sort_fastest ()
* More elegant coding for merge_sort_fastest

* More elegant coding for merge_sort
2019-05-14 18:17:25 +08:00
Ravi Patel
70bb6b2f18 Added Huffman Coding Algorithm () 2019-05-13 10:45:27 +05:30
Bhushan Borole
3f7bec6c00 Added page-rank algorithm implementation ()
* Added page-rank algorithm implementation

* changed init variables
2019-05-12 19:46:47 +08:00
Anup Kumar Panwar
d8badcc6d5
Update README.md 2019-05-12 09:10:56 +05:30
Julien Castiaux
36828b106f [FIX] maths/PrimeCheck ()
Current implementation is buggy and hard to read.

* Negative values were raising a TypeError due to `math.sqrt`
* 1 was considered prime, it is not.
* 2 was considered not prime, it is.

The implementation has been corrected to fix the bugs and to enhance
readability.

A docstring has been added with the definition of a prime number.

A complete test suite has been written, it tests the 10 first primes, a
negative value, 0, 1 and some not prime numbers.

closes 
2019-05-11 19:20:25 +08:00
Junth Basnet
56513cb21f add-binary-exponentiation () 2019-05-10 19:03:05 +08:00
Lorenz Nickel
30a3582983 fix: replaced outdated url ()
http://www.lpb-riannetrujillo.com/blog/python-fractal/ moved to http://www.riannetrujillo.com/blog/python-fractal/
2019-05-09 03:48:30 +08:00
weixuanhu
7677c37011 update 'sorted' to 'ascending sorted' in comments ()
To avoid confusion all 'sorted' to 'ascending sorted' in comments
2019-05-06 17:54:31 +08:00
Anup Kumar Panwar
e22ea7e380
Update Directed and Undirected (Weighted) Graph.py 2019-05-04 21:53:06 +05:30
Anup Kumar Panwar
c5c3a74f8f
Update README.md 2019-05-04 15:43:37 +05:30
yolstatrisch
7b89d03dd7 Added an O(1) solution to problem 002 ()
* Added an O(1) solution to problem 002

* Removed comments from sol3.py that were accidentally added to sol4.py
2019-05-02 00:44:21 +08:00
Gattlin Walker
06dbef04a0 Adding quick sort where random pivot point is chosen () 2019-04-30 21:16:42 +08:00
sakuralethe
48553da785 variable in function should be lowercase () 2019-04-26 17:43:51 +08:00
Viraat Das
2fc2ae3f32 Created a generalized algo to edmonds karp ()
Edmonds Karp algorithm is traditionally with only one source and one sink. What do you do if you have multiple sources and sinks? This algorithm is a generalized algorithm that regardless of however many sinks and sources you have, will allow you to use this algorithm. It does this by using the traditional algorithm but adding an artificial source and sink that allows with "infinite" weight.
2019-04-25 19:48:14 +08:00
Vysor
df04d94543 Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. ()
* Renaming directories
* Adding a recursive factorial algorithm
2019-04-22 22:53:56 +08:00
John Law
48bba495ae
Rename is_Palindrome to is_Palindrome.py () 2019-04-20 15:13:02 +08:00
Sanders Lin
a91f0e7ca0 Updated Euler problem 21 sol1.py 2019-04-19 21:30:40 +05:30
jfeng43
a170997eaf Add animation for heap sort 2019-04-19 21:01:06 +05:30
WILFRIED NJANGUI
b2f1d9c337 implementation of tower_of_hanoi algorithm () 2019-04-14 19:58:16 +08:00