improved day04 (thanks to Heiko)
This commit is contained in:
parent
8959d47abe
commit
543d0823c3
1 changed files with 1 additions and 2 deletions
|
|
@ -31,8 +31,7 @@ class Range:
|
|||
|
||||
def overlap(self, other: Range) -> bool:
|
||||
""" Check if this range obverlaps with the other """
|
||||
return (self.start >= other.start and self.start <= other.end) or (
|
||||
other.start >= self.start and other.start <= self.end)
|
||||
return self.start <= other.end and other.start <= self.end
|
||||
|
||||
|
||||
@dataclass(slots=True, frozen=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue