## general doubts

Which is more prefereble appraoch ,
implementing a stacks,queqes,trees using
Arrays or using linked list and why.

Compared to arrays Linked list allocates the memory dynamically. However, time complexity in both the scenario is same for all the operations i.e. push, pop and peek.

In linked list implementation of stack, the nodes are maintained non-contiguously in the memory.
Both the ways are fine you should decide according to the question

Can u give me some examples,according to questions how can we decide whether to use linked list or arrays???