Skip to content

Commit

Permalink
Update 253-Meeting-Rooms-ii.py
Browse files Browse the repository at this point in the history
It appears that Leetcode updated this question where they removed the custom definitions for this problem. Before the definition was: 
"""
class Interval (Object):
     def __init__ (self, start, end):
             self.start = start
             self.end = end

 def minMeetingRooms(self, intervals):
        start = sorted([i.start for i in intervals])
        end = sorted([i.end for i in intervals])
"""
Without the custom definition the current solution needs to be updated to use indexes as follows:
"""
start = sorted([i[0] for i in intervals])
end = sorted([i[1] for i in intervals])
"""
  • Loading branch information
rafiq authored Nov 22, 2022
1 parent c17e82c commit b305f8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/253-Meeting-Rooms-ii.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ class Solution:
"""

def minMeetingRooms(self, intervals):
start = sorted([i.start for i in intervals])
end = sorted([i.end for i in intervals])
start = sorted([i[0] for i in intervals])
end = sorted([i[1] for i in intervals])

res, count = 0, 0
s, e = 0, 0
Expand Down

0 comments on commit b305f8f

Please sign in to comment.