Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Using LIMIT 1 is fundamentally wrong. This cuts off some of the correct answers in the case when there are several pairs of actors with the maximum number of meetings. In the tests, there is only one pair of actors with the maximum number of meetings. However, in real life, there may be several pairs - correct answers. So in general this solution is wrong.
Thank you for your reply. Makes sense.
The test cases just never set arr to None, that's why there's no error. What they do though is setting arr to [], which is different than None.
But in general you're right. One should check if arr is None before iterating over it.
Newbie question here. I feel like I just completed a Kata where if you didn't check for if arr is None then it would throw an error. Why doesn't this throw an error if arr is None?
This comment is hidden because it contains spoiler information about the solution