All the elements in an array are stored contiguously in memory (as a single block). Elements of linked list may be scattered in memory (that’s why need a pointer to access the next element).
Next: Size …
All the elements in an array are stored contiguously in memory (as a single block). Elements of linked list may be scattered in memory (that’s why need a pointer to access the next element).
Next: Size …
why we can not use binary search in linked list even it is sorted,what is main reason behind this fact?