Define when we should use plain list

Define when we should use plain list.

E

Expert

Verified

Plain List:

Stores all items sequentially, therefore random lookup is very fast (which I can instantly say "I wish for the 657415671567th element, and go straight to this, since we know its memory address will be specifically 657415671567 superior than the first item). It has little or no memory overhead within storage. Although, it has no way of automatically resized - you have to create a newest array, copy across all the values, and after that delete the old one. Plain lists are helpful while you require to lookup data from anywhere within the list, and you identify that your list will not be longer than an exact size.

   Related Questions in Data Structure & Algorithms

©TutorsGlobe All rights reserved 2022-2023.