Data Structures

Data Structures


What is memory?

Before coming to data structures, I would like to introduce memory to you. So memory is a storage device that is used to store data we wish. You can visualize memory as a giant container made up of tiny blocks. These blocks are the places where data is stored in the form of 1's & 0's.

What are data structures?

Now, since you have been briefly introduced to memory, it's time for data structures. At its core data structures are the methods that let us decide how we want to use the tiny blocks of memory. The data structure is a format to store, access, manipulate, and operate on stored data etc. e.g.

  • Arrays - so arrays are the continuous allocation of memory blocks. This data structure allows you to store elements in a continuous fashion.

  • Linked List - this data structure is made up of nodes & these nodes are scattered in memory here and there, however, the nodes are connected by pointers or reference variables. This data structure allows us to use memory blocks in a random fashion.

  • Trees - this data structure is also made up of nodes & are connected together by pointers or reference variables. Although they are made up of nodes like the linked list yet both data structures are very dissimilar from each other. The tree is a hierarchical data structure whereas linked lists are linear data structures.

  • This is not it there are stack, queue, tree, graph, trie, hashmap, hashtable, heap and other advanced data structures too which come with their own functionalities.

Why data structures?

  • It is calculated that around 4.9 billion or 62% of the world's population has regular access to the internet and this is possible because of the easy and cheap availability of the internet. This amount of traffic on the internet generates a huge amount of data. Now, this data is the key point here. Now see, this data is fuel for AI. In order to train AI models, companies collect data.

  • But here is the main problem it is assumed that 80% of the collected data is unorganized which means they are stored randomly. Now this way of storing the data leads to inefficiency(in terms of computing power, power consumption and human intelligence too) when it comes to accessing the stored data, operating it, manipulating it, searching through it & doing some other things to it.

  • Now shines the concept of Data Structures, and with the help of it we can overcome all the problems mentioned above.

  • Also at least for India, in order to get a decent job in a product-based company, data structure must be your first skill to master.

Did you find this article valuable?

Support Data Structures & algorithms by becoming a sponsor. Any amount is appreciated!