What is the time complexity of the vector pushback operation in C?

1 answer

Answer

1138515

2026-05-06 21:40

+ Follow

The time complexity of the vector pushback operation in C is O(1) on average, but can be O(n) in the worst case scenario when the vector needs to be resized.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.