Recall that the worst case running time for the depth method is O(n).