as the name implies its a way of structuring data, but in our case we are taking about data so we are going to store the data inside of our ram
array are very simple data structure, its get stored as contiguous set of Ordered data, [1,2,3,4,5,6] just like this it will be represented in the memory in similar way
static arrays: fixed size arrays, adding more elements to static arrays is a limitation(We dont use static arrays in js by default)
→ integers take 4 byte of space
→ character takes 1 byte of space
{important point
Random Access Memory as the name says this is what allows us to to use directly accessing any part of array in constant time, this is what property of a ram is }
stack is just an array but restricted to only end value operations
stacks are considered as LIFO data structures
which means LAST IN, FIRST OUT
stack is a data structure that allows us to
Push something at the end with O(1)
pop something of end with O(1)
peek/top O(1)
Just to say directly they are objects with reference nesting allocated randomly across memory with reference to every next object
linked lists are Node based data-structures, where a node contains 2 elements
first the value that is store inside node