计算机科学导论(中英双语版)(邓辉舫)PPT全套完整教学课件.ppt

计算机科学导论(中英双语版)(邓辉舫)PPT全套完整教学课件.ppt

Inthearray-basedlist,elementsarestoredincontiguouscellsofthearray.Andthispropertymustbemaintainedafterinsert,appendandremoveoperations.Array-basedListFigure11.3Insertinganelementattheheadofanarray-basedlistItiseasytoinsertorremoveelementsatthetailofthelist,sotheappendoperationtakesO(1)time.Butifanelementneedstobeinsertedattheheadofthelist,allelementsmustshiftonepositiontowardthetailtomakeroom,asillustratedbyFigure11.3.ThisprocesstakesO(n)timeifthelisthasncurrentelements.Ifwewanttoin

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档