See last time i talked about how data structures is everywhere around us.
And i start by making an analogue of an array data structure and how its everywhere in our lives. Now its time expand more on that and see what other data structures are and how do we use them in our everyday bustling lives.
Well if you're a programmer you obviously know that you could and can create an entire world of your imagination into a digital world and they is no shortage of variables in your construct.
But all these variables are inspired by what you get or altleast perceive in the real world.
So you have these two worlds, one you could test out the variables and the other you could live or are living out the variables, you have two world complementing each other. For example you have an Array data structure that you can use to understand persive dimensions in the digital world to modeling 3D -N dimensions that you couldn't but otherwise understand in the real world. Okay so lets get started. 😃
Arrays data structure
We start with Arrays data structure beacuse its the fundamental to most of the data structures that we have or know exist.
Defination of an array data structure is that, its one that stores or holds items of same type in a sequential or contiguous memory location and actions or operations on its elements are performed in sequence at the very least.
In the real world we have this playing out, your very growth is an arrangement of an array of growth. You start out small, and then big.
Your schedule or daily routine, your walking of every step you take provided you know the next step then you can skip to it otherwise its step by step or journey, your packing of your favorite things in a box or counting . The arrangement of the petals on a flower or the finger prints. And so on, all we have or are doing is a step by step process and a defined fixed size at the time of start. This way you can never grow any taller or bigger than whats already defined in your array structure (genetically ) or go beyond than whats already your destination of your journey.
So what you see here, is this fascinating implementation of such a data structure in the digital world by these very smart dedicated programmers. On a larger or more grandeur scale is the universe, in it many other other universes or worlds all but within other worlds otherwise, until we get to our world. Science call this dimensions or multiverse. And lo and behold these programmers figures it out that the array can have or hold multiple arrays in it.
Multidimensional Arrays
And arrays in digital world gets to hold or store other arrays in them.
So you have a 1dimensional array or simple array and a 2D, 3D, Nth D or multidimensional array. Allowing the digital world to visualize or render its world in any dimensional needed. This changed everything, we could now persive any dimension on our screens.
But soon the programmers would realise that thier digital world could only keep up this much with arrays data structure, now arrays would be limited only to that extent. Because no implementation hardware or software, can model a mathematical concept completely.To ensure predictability of such a powerful data structure constrained by its digital world, these clever and smart programmers devised a standard that would allow aleast not more than 10D (dimensions ) of array to be defined. As this is what most compilers would handle or they risk their digital world run into cheos😃.
To compasate for these limitations such as fixed size and sequential storage of data they had to look for new ways of storing data that could be stored at non-contiguous memory locations.It is important to recognize the limitations of a particular implementation. Often it will be possible to present several implementations of the same data type each with its own strength and weakness.And we going to see such data structures in our real world later on. Now lets see how this Array data structure is implemented, used in the digital world.
To be continued..
Top comments (0)