Commit Graph

60 Commits

Author SHA1 Message Date
Christian Clauss
26b0803319
Simplify sudoku.is_completed() using builtin all() (#1608)
* Simplify sudoku.is_completed() using builtin all()

Simplify __sudoku.is_completed()__ using Python builtin function [__all()__](https://docs.python.org/3/library/functions.html#all).

* fixup! Format Python code with psf/black push

* Update sudoku.py

* fixup! Format Python code with psf/black push

* Old style exception -> new style for Python 3

* updating DIRECTORY.md

* Update convex_hull.py

* fixup! Format Python code with psf/black push

* e.args[0] = "msg"

* ValueError: could not convert string to float: 'pi'

* Update convex_hull.py

* fixup! Format Python code with psf/black push
2019-12-08 22:42:17 +01:00
Christian Clauss
b838f1042c Fix indentation contains tabs (flake8 E101,W191) (#1573) 2019-11-15 23:05:00 -08:00
William Zhang
9eac17a408 psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
adith bharadwaj
f3c0b132bc Added sudoku solving program in backtracking algorithms (#1128)
* Added sudoku solver in backtracking

* Added sudoku solver program

* Added sudoku solver

* Added sudoku solver

* Format with black, add doctests, cleanup main
2019-08-13 15:51:06 +02:00
obelisk0114
628794d89d Add combinations (#1015)
* Update Bucket Sort time complexity analysis

* Add combinations

* Adding doctest

* Fix doctest problem
2019-07-14 07:45:54 +02:00
Aditi Agarwal
4ff2a9dd4e minimax (#947)
* minimax.py

minimax algorithm is used for game like tic tac toe. It traces the path and selects the optimal move.

* minimax.py

Minimax is used in decision making and game theory to find the optimal move for a player, when your opponent also plays optimally. It is widely used in games like Tic-Tac-Toe, Chess.

* Delete minimax.py

* Update minimax.py

* Minimax is a backtracking algorithm that is used in game theory to find the optimal move for a player, assuming that your opponent also plays optimally
2019-07-07 06:59:58 +02:00
Erfan Alimohammadi
69bed59036
Fix backtrack time complexity (#965)
* Update backtracking/all_permutations.py
2019-07-06 20:01:52 +04:30
Erfan Alimohammadi
839160f83a Generate all permutations of a sequence, using backtracking (#962)
* Fix typo

* Add all_permutations algorithm to backtracking directory
2019-07-06 16:19:36 +03:00
Erfan Alimohammadi
cc4cf3ece7
Generate all subsequences using backtracking (#961)
* Add all_subsequences to backtracking directory
2019-07-06 17:43:50 +04:30
Hetal Kuvadia
831558d38d #945 Backtracking Algorithms (#953)
* Adding nqueens.py for backtracking

* Adding sum_of_subsets.py for backtracking

* Update nqueens.py

* Rename nqueens.py to n_queens.py

* Deleting /other/n_queens.py
2019-07-05 14:18:36 +05:30