imp
c1b15a86ba
[mypy] Fix type annotations for dynamic programming ( #4687 )
...
* Fix mypy error for knapsack.py
* Fix mypy error for longest_increasing_subsequence
* Fix mypy error for fractional_knapsack_2.py
2021-09-03 11:49:23 +02:00
Christian Clauss
9200a2e543
from __future__ import annotations ( #2464 )
...
* from __future__ import annotations
* fixup! from __future__ import annotations
* fixup! from __future__ import annotations
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-09-23 13:30:13 +02:00
Christian Clauss
1f8a21d727
Tighten up psf/black and flake8 ( #2024 )
...
* Tighten up psf/black and flake8
* Fix some tests
* Fix some E741
* Fix some E741
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-05-22 08:10:11 +02:00
Christian Clauss
5df8aec66c
GitHub Action formats our code with psf/black ( #1569 )
...
* GitHub Action formats our code with psf/black
@poyea Your review please.
* fixup! Format Python code with psf/black push
2019-11-14 19:59:43 +01:00
John Law
a9d5378ce2
Doctest and typing for longest_increasing_subsequence.py ( #1526 )
...
* Update longest_increasing_subsequence.py
* Update longest_increasing_subsequence.py
* Format longest_increasing_subsequence.py to PEP8
* Update longest_increasing_subsequence.py
2019-11-05 02:06:16 +08:00
William Zhang
9eac17a408
psf/black code formatting ( #1277 )
2019-10-05 10:14:13 +05:00
Christian Clauss
47a9ea2b0b
Simplify code by dropping support for legacy Python ( #1143 )
...
* Simplify code by dropping support for legacy Python
* sort() --> sorted()
2019-08-19 15:37:49 +02:00
cclauss
4e06949072
Modernize Python 2 code to get ready for Python 3
2017-11-25 10:23:50 +01:00
Mehdi ALAOUI
08cbd113a4
Code optimized and complexity decreased
2017-04-10 13:49:01 +01:00
Mehdi ALAOUI
e01cf425bd
Comments reviewed
2017-04-07 03:27:15 +01:00
Mehdi ALAOUI
628f184af5
The program returns now the longest increasing subsequence instead of returning only the length. Code optimized and well commented
2017-04-07 03:19:02 +01:00
dhruvsaini
436edf3a88
Create longest_increasing_subsequence.py
...
The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order. For example, the length of LIS for {10, 22, 9, 33, 21, 50, 41, 60, 80} is 6
2017-01-03 16:54:38 +05:30