Member-only story
The Basics of Array List
Array list is basically an array that has the ability to dynamically resize itself once it is fully filled with elements.
Have you ever booked seats for a movie or a concert or a ball game online? Chances are you have or someone you know have done that for you. Hey, ✋ if you are a leech in your circle of friends when it comes to this? 🙌
For those of you who have, then you must know that you need to specify how many seats required at the time of booking, for example, if there are 4 of you, then you’d fill in the number of seats field as 4 and the screen will show the 💺 💺 💺 💺 where you‘d be sitting.
Let’s say there are 2 additional friends that reach out to you last minute just before you confirm the booking. You would then change the number of seats to 6. What would happen on the screen is that it would just add 💺 💺 to the existing row where your four seats were and now it would just show 💺 💺 💺 💺 💺 💺. Now, in case there are no more seats available adjacent to the 4 seats you originally have, the system will find another row where there are 6 adjacent seats so all the 6 of you can sit together.
What is an Array?
An array is a data structure that stores a collection of items of the same type, e.g…