Skip to content

Commit

Permalink
added less than or equal to Priority class overload
Browse files Browse the repository at this point in the history
  • Loading branch information
Sollimann committed Apr 30, 2020
1 parent 9f3a8bb commit e640425
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/python/priority_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __le__(self, other):
:param other: comparable keys
:return: lexicographic order
"""
return self.k1 < other.k1 or (self.k1 == other.k1 and self.k2 <= other.k2)


class PriorityNode:
Expand Down

0 comments on commit e640425

Please sign in to comment.