Time Complexity
The time complexity of this problem is O(n) as the list is iterated over once.
But indeed the list was iterated over only half of the size.
Sorry I couldn’t find appropriate tags for the question from the list
Time Complexity
The time complexity of this problem is O(n) as the list is iterated over once.
But indeed the list was iterated over only half of the size.
Sorry I couldn’t find appropriate tags for the question from the list