| 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. |
|