Examples of applications that require a stateful context include a store checkout process, product customization, multipage form wizards, and many other applications based on linear interactions.
We can use an array to store a linear collection. Adding new elements to an array is easy since we simply place the new element in the first free position at the rear of the array.