Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Ahmed Yarub Hani Al Nuaimi
Multiple Issues in the solution

Ahmed Yarub Hani Al Nuaimi

Jun 18, 2024

1- Adding the key to intervals.sort() does not make a difference.

2- I really think that the solution worked due to having very simple use-cases. We should keep the max number of rooms (which is max(len(free_rooms))) and return it.

1

0

Comments
Comments
Aingkaran Jega
Aingkaran Jegaa year ago

agreed! also typo in the time complexity O(N \log N) should be O(Nlog(n))

On this page