Skip to content

Commit

Permalink
calc_profit always returns an int (TheAlgorithms#2090)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
cclauss and github-actions authored Jun 11, 2020
1 parent 3de6f01 commit 657d461
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions greedy_method/greedy_knapsack.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
Calculate the maximum profit that the shopkeeper can make given maxmum weight that can
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-
:param profit: Take a list of profits
Expand Down

0 comments on commit 657d461

Please sign in to comment.