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:
Christian Clauss
2020-06-11 16:36:09 +02:00
committed by GitHub
parent 3de6f010c3
commit 657d46101d

View File

@ -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