mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-07 10:00:55 +00:00
calc_profit always returns an int (#2090)
* calc_profit always returns an int * fixup! Format Python code with psf/black push Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
parent
3de6f010c3
commit
657d46101d
|
@ -15,10 +15,9 @@ weight[i] >= 0
|
||||||
Calculate the maximum profit that the shopkeeper can make given maxmum weight that can
|
Calculate the maximum profit that the shopkeeper can make given maxmum weight that can
|
||||||
be carried.
|
be carried.
|
||||||
"""
|
"""
|
||||||
from typing import Union
|
|
||||||
|
|
||||||
|
|
||||||
def calc_profit(profit: list, weight: list, max_weight: int) -> Union[str, int]:
|
def calc_profit(profit: list, weight: list, max_weight: int) -> int:
|
||||||
"""
|
"""
|
||||||
Function description is as follows-
|
Function description is as follows-
|
||||||
:param profit: Take a list of profits
|
:param profit: Take a list of profits
|
||||||
|
|
Loading…
Reference in New Issue
Block a user