You are viewing a single comment's thread. Return to all comments →
Time complexity is O(n), but it traverses the given list 5 times, hence it will be accordingly slower than the code in main post.
Migratory Birds
You are viewing a single comment's thread. Return to all comments →
Time complexity is O(n), but it traverses the given list 5 times, hence it will be accordingly slower than the code in main post.