Discussion Board
Go to the previous messageThere are no next messages
Current Forum: 15-211 Main Forum
Date: Tue Dec 18 2001 10:57 pm
Author: Raff, Paul <praff@andrew.cmu.edu>
Subject: Re: Running time of insert in a sorted array

The reason it's O(n) is because we have to shift back every index after the place we want to insert . . . a very costly operation.
Post response

Go to the previous messageThere are no next messages
Current Thread Detail:
Running time of insert in a sorted array      Tan, Jit Ken      Tue Dec 18 2001 7:42 pm       
Re: Running time of insert in a sor...      Lee, Charles C.      Tue Dec 18 2001 10:31 pm       
Re: Running time of insert in a ...      Raff, Paul      Tue Dec 18 2001 10:57 pm       

Back to previous screen