Time complexity of contains(Object o), in an ArrayList of ...
As it can be seen from the code, in order to find an index of a given element, one, in the worst case, must iterate through the whole array. As a size of the array grows and so does the search time by an element. Hence, the time complexity of contains method is O(n), where n is the number of elements in the list.
DA: 90 PA: 34 MOZ Rank: 20