Traversing a linked list and traversing an array are both O(n). · QuantMax