"""
1. Difference between Array and List
Array is collection of homogeneous elements.
List is collection of heterogeneous elements.

**For Array memory allocated is static and continuous.
**For List memory allocated is dynamic and random.

Array:

Array is used to store a fixed-size sequential collection of elements of the same type.

- User don't need to keep in track of next memory allocation.
- Easy to access elements by index
- Insert elements into the middle is costy.

List:

While A linked list is a dynamic data structure. The number of nodes in a list is not fixed and can grow and shrink on demand.
It is useful when dealling with an unknown number of objects

- User has to keep in Track of next location where memory is allocated.
- Not easy to access element by number
- Easy to insert element into the middle
"""

"""
1. Difference between Array and List
Array is collection of homogeneous elements.
List is collection of heterogeneous elements.

**For Array memory allocated is static and continuous.
**For List memory allocated is dynamic and random.

Array:

Array is used to store a fixed-size sequential collection of elements of the same type.

- User don't need to keep in track of next memory allocation.
- Easy to access elements by index
- Insert elements into the middle is costy.

List:

While A linked list is a dynamic data structure. The number of nodes in a list is not fixed and can grow and shrink on demand.
It is useful when dealling with an unknown number of objects

- User has to keep in Track of next location where memory is allocated.
- Not easy to access element by number
- Easy to insert element into the middle
"""

1. Difference between Array and List Array is collection of homogeneous elements. List is collection of heterogeneous elements.  **For Array memory allocated is static and continuous. **For List memory allocated is dynamic and random.  Array:  Array is used to store a fixed-size sequential collection of elements of the same type.  - User don't need to keep in track of next memory allocation. - Easy to access elements by index - Insert elements into the middle is costy.  List:  While A linked list is a dynamic data structure. The number of nodes in a list is not fixed and can grow and shrink on demand. It is useful when dealling with an unknown number of objects  - User has to keep in Track of next location where memory is allocated. - Not easy to access element by number - Easy to insert element into the middle