you are viewing a single comment's thread
view the rest of the comments
[–] 17 points 5 months ago (2 children)

it really only has a time complexity of O(1) for the first few items though. beyond that it increases to O(n) again

  • source
  • hideshow 2 child comments
  • [–] 15 points 5 months ago (1 child)

    Well you're supposed to keep the structure an array, not let it become a stack.

  • source
  • parent
  • hideshow 1 child comment