educative.io

Bug in solution

Bug in suggested solution:
It should be the following:
return self.interval.end < other.interval.end
min Heap based on end not start.

def lt(self, other):
# min heap based on meeting.end
return self.interval.start < other.interval.start


Course: Grokking the Coding Interview: Patterns for Coding Questions - Learn Interactively
Lesson: Solution Review: Problem Challenge 3 - Grokking the Coding Interview: Patterns for Coding Questions

Hi @Ankit_Nayak
Thanks for pointing this out. We’ll look into it, your feedback is much appreciated.

1 Like