Compute polynomial, Cn.x^n + Cn-1.x^(n-1) + … … + C2.x^2 + C1.x + C0
June 12, 2012
Non-leaf nodes of a binary tree
June 12, 2012

Difference between linked list and Arrays

Array’s cannot be expanded. Even if you have an array on heap or a variable length array on stack (C99 feature), it cannot be expanded once the memory is allocated. (You may counter argue, that we have realloc, but believe me that’s not what we mean by expanding at the same place). The size of Linked list can be increased by allocating more nodes and adjusting the pointers.

Next: Searching …

1 Comment

  1. anuj says:

    why we can not use binary search in linked list even it is sorted,what is main reason behind this fact?

Leave a Reply

Your email address will not be published. Required fields are marked *