Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 5
Because to access any element in a linked list you have to iterate from the front ( or back ) through each element until you find the element you're looking for. Which makes the lookup time O(n).
Arrays on the other hand can be accessed anywhere in O(1).
You can perform a binary search on a list, but it's just gonna be veeeeeeery slow. :)