Dynamic Array Time Complexity