Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Engineering LibreTexts

Search

  • Filter Results
  • Location
  • Classification
    • Article type
    • Author
    • Set as Cover Page of Book
    • License
    • Show TOC
    • Transcluded
    • OER program or Publisher
    • Autonumber Section Headings
    • License Version
    • Print CSS
  • Include attachments
Searching in
About 1 results
  • https://eng.libretexts.org/Bookshelves/Computer_Science/Databases_and_Data_Structures/Open_Data_Structures_-_An_Introduction_(Morin)/02%3A_Array-Based_Lists/2.01%3A_ArrayStack_-_Fast_Stack_Operations_Using_an_Array
    If we ignore the cost of the potential call to \(\mathtt{resize()}\), then the cost of the \(\mathtt{add(i,x)}\) operation is proportional to the number of elements we have to shift to make room for \...If we ignore the cost of the potential call to \(\mathtt{resize()}\), then the cost of the \(\mathtt{add(i,x)}\) operation is proportional to the number of elements we have to shift to make room for \(\mathtt{x}\). Therefore, if \(\mathtt{n}_i\) denotes the value of \(\mathtt{n}\) during the \(i\)th call to \(\mathtt{resize()}\) and \(r\) denotes the number of calls to \(\mathtt{resize()}\), then the total number of calls to \(\mathtt{add(i,x)}\) or \(\mathtt{remove(i)}\) is at least

Support Center

How can we help?