Commit Graph

3068 Commits

Author SHA1 Message Date
Yurii
b7fb0630f2 Feature/fix caesar cipher (#1350)
* change var names for better reading

* rewrite encrypt function to fix ascii char ranges

* fix decrypt function

* update formatting (add f-strings)

* upd fuctions

* add f-string formatting (python3.6+)

* add type hints (python3.4+)
2019-10-18 07:36:52 +02:00
Yurii
3cc3531076 Feature/update least common multiple (#1352)
* renamed module to extend the acronym

* add type hints (will not work with Python less than 3.4)

* update docstring

* refactor the function

* add unittests for the least common squares multiple
2019-10-18 07:35:29 +02:00
Yurii
870eebf349 rewrite the algorithm from scratch (#1351) 2019-10-18 07:27:55 +02:00
Stephen
14c23bc847 create qr_decomposition (#1363) 2019-10-18 06:48:16 +02:00
aritrartira
28b964c9b5 Added missing problem statements (#1364) 2019-10-18 06:46:13 +02:00
Du YuanChao
83c104e839 Divide and Conquer (#1308)
Thanks for your persistence!
2019-10-18 06:20:36 +02:00
Milad Sadeghi DM
63d8cadc3e Fixing Some Minor Issues (#1386)
* Replacing mutable default argument in __init__

* Fixing typo mistakes in lib.py

* Simplifying chained comparisons

* Update lib.py
2019-10-17 20:13:28 +02:00
Stephen
927a8c7722 added horner's method (#1360) 2019-10-17 16:50:51 +02:00
Andrii Siriak
dcee2eac68 Update build badge (#1378)
* Update build badge

* Update README.md
2019-10-17 16:02:40 +02:00
Aliabbas Merchant
b190c8f629 Rename GCD File (#1354) 2019-10-15 00:05:51 +05:30
Jigyasa G
67291a5bce Modified longest_common_ssubsequence.py for successful doctests (#1332) 2019-10-12 02:32:41 +08:00
Jigyasa G
e678879892 Adding doctests for sum_of_subset.py (#1333) 2019-10-12 02:29:50 +08:00
Jigyasa G
ea47ae2932 Adding missing Doctests (#1330)
* Adding doctests in abbreviation

* Adding doctests in fibonacci.py
2019-10-10 00:20:19 +05:00
Jigyasa G
b6cc37d461 mergesort added (#1313)
* mergesort added

* added doctest
2019-10-10 00:12:09 +05:00
Rishabh Kumar
61f7f94fde Create karatsuba.py (#1309)
* Create karatsuba.py

Added karatsuba algorithm for multiplication of two numbers

* Update karatsuba.py

Added doctests and divmod

* Update karatsuba.py
2019-10-08 17:25:50 +05:00
Du YuanChao
e80d248e65 optimization (#1303) 2019-10-08 13:25:00 +05:00
Du YuanChao
f0568d642e less code (#1292) 2019-10-08 13:24:01 +05:00
Du YuanChao
0da4d0a7f3 make code more readable (#1304) 2019-10-08 13:22:40 +05:00
Kaushik Amar Das
25701a9877 added doctests to scoring_functions.py (#1300)
* added doctests to scoring_functions.py

* dedented lines
2019-10-08 13:12:27 +05:00
Craigory V Coppola
3a06aba66a Update Linear Algebra Readme (#1298)
Update formatting to better indicate matrix and vector sections
2019-10-07 23:32:16 +05:00
Nishant-Ingle
06d736199b Added comment (#1294) 2019-10-07 23:29:14 +05:00
Maram Sumanth
22bd6ff967 Update average_mean.py (#1293) 2019-10-07 23:26:40 +05:00
Anup Kumar Panwar
01bc785e84 Fixed links in DIRECTORY.md (#1291) 2019-10-07 23:23:46 +05:00
mvhb
067a9b5136 adding input option and increasing the number of doctest (#1281)
* adding input option and incresing the number of doctest

* mixing positive and negative numbers in the same test case
2019-10-06 23:55:55 +05:00
Sushil Singh
9cc9f67d64 Chinese Remainder Theorem | Diophantine Equation | Modular Division (#1248)
* Update .gitignore to remove __pycache__/

* added chinese_remainder_theorem

* Added Diophantine_equation algorithm

* Update Diophantine eqn & chinese remainder theorem

* Update Diophantine eqn & chinese remainder theorem

* added efficient modular division algorithm

* added GCD function

* update chinese_remainder_theorem | dipohantine eqn | modular_division

* update chinese_remainder_theorem | dipohantine eqn | modular_division

* added a new directory named blockchain & a files from data_structures/hashing/number_theory

* added a new directory named blockchain & a files from data_structures/hashing/number_theory
2019-10-06 23:52:04 +05:00
Parth Paradkar
b1a769cf44 Add pure implementation of K-Nearest Neighbours (#1278)
* Pure implementation of KNN added

* Comments and test case added

* doctest added
2019-10-06 23:50:50 +05:00
TheRealDarkCoder
0a7d387acb Added a python script for finding sum of arithmetic series (#1279)
* Added a python script for finding sum of arithmetic series

* Added some linting

* Resolved comments

* Fixed flake8 test
2019-10-06 23:47:32 +05:00
Nikhil Nayak
c4a97677a5 Update fibonacci_sequence_recursion.py (#1287)
- Fixed minor bugs.
 - Minimized Codes
2019-10-06 23:35:56 +05:00
Christian Clauss
6ebd899c01 CONTRIBUTING.md: Fix mistake in doctest ;-) (#1266)
* CONTRIBUTING.md: Fix mistake in doctest ;-)

* Update CONTRIBUTING.md
2019-10-05 23:32:58 +08:00
William Zhang
9eac17a408 psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
Kaushik Amar Das
07f04a2e55 adding jaccard similarity (#1270)
* adding jaccard similarity

* renaming files. zeebus! what an headache
2019-10-04 09:59:45 +02:00
Simon Landry
309204a581 Add problem 42 solution (#1259) 2019-10-03 22:48:53 +02:00
Simon Landry
6e69208666 Add problem 32 solution (#1257) 2019-10-03 22:47:39 +02:00
Simon Landry
d28fc71202 Add problem18 solution (#1260) 2019-10-03 22:47:08 +02:00
Simon Landry
f970c73061 Add problem 23 solution (#1261) 2019-10-03 22:08:25 +02:00
Shubham garg
03aba96c0a added defination (#1244) 2019-10-03 21:31:11 +02:00
Kaushik Amar Das
0e2d6b2963 adding softmax function (#1267)
* adding softmax function

* wraped lines as asked
2019-10-03 16:30:36 +02:00
William Zhang
0e333ae021 added bogobogosort (#1258)
* added bogobogosort

* fix indentation error
2019-10-03 11:17:30 +02:00
Parth Paradkar
390feb0b23 Add doctests for sorting algorithms (#1263)
* doctests and intro docstring added

* doctests, docstrings and check for empty collection added

* Intro docstring added

* python versions reversed
2019-10-03 10:19:11 +02:00
Anup Kumar Panwar
b8490ed097 Removed owners from README (#1254) 2019-10-03 15:17:22 +08:00
Christian Clauss
df44d1b703 Update CONTRIBUTING.md (#1250)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Add Python type hints and mypy
2019-10-02 21:49:00 +05:30
Shoaib Asgar
b738281f2b maths-polynomial_evalutation (#1214)
* maths-polynomial_evalutation

* added doctest and removed redundancy
2019-10-01 08:58:00 +02:00
yijoonsu
189b350312 Deque (#1200)
* deque add pop

* deque add remove
2019-09-30 16:27:41 +02:00
Kaushik Amar Das
4617aa78b2 DBSCAN algorithm (#1207)
* Added dbscan in two formats. A jupyter notebook file for the
storytelling and a .py file for people that just want to look at the
code. The code in both is essentially the same. With a few things
different in the .py file for plotting the clusters.

* fixed LGTM problems

* Some requested changes implemented.
Still need to do docstring

* implememted all changes as requested
2019-09-29 10:44:41 +02:00
Christian Clauss
a79fc2b92a Fix the build typo: fn --> fn1 (#1205) 2019-09-26 21:02:04 +05:30
Charitoc
2375bfbee5 Adding stooge sort (#1206)
* Adding stooge sort

* Updated doctest

* Just added underscore in the name
2019-09-26 17:19:01 +02:00
Raj
6ac7b1387f Min head with decrease key functionality (#1202)
* Min head with decrease key functionality

* doctest added

* __str__ changed as per Python convention

* edits in doctest

* get_value by key added

* __getitem__ added
2019-09-26 00:03:31 +02:00
Aniruddha Bhattacharjee
e40d4a25f9 Added Matrix Exponentiation (#1203)
* Added the matrix_exponentiation.py file in maths directory

* Implemented the requested changes

* Update matrix_exponentiation.py
2019-09-25 20:08:45 +02:00
luoheng
01601e6382 Add disjoint set (#1194)
* Add disjoint set

* disjoint set: add doctest, make code more Pythonic

* disjoint set: replace x.p with x.parent

* disjoint set: add test and refercence
2019-09-23 05:08:20 +02:00
Holden-Lin
837bfffd99 Rename sorted_vector_machines.py to support_vector_machines.py (#1195)
SVM stands for support vector machines. Intuitively, a support vector is the vector right near the decision boundary.
2019-09-22 16:56:32 +02:00