educative.io

Educative

Fetch top movies - complexity

n should be total elements, not the length of largest list

@Amit_Gupta n is not the length of the largest list but the maximum length of a single list which essentially is the final linked list in our solution, since we are storing our output in a single list.