A Day with Data Structure

Hasan Al Mamun
5 min readSep 22, 2018

In my university days also after graduated, I had to answer some simple question to my junior like why we need to learn data structure, is not Array enough to do all the stuff, what is the difference between Tree and BST (Binary Search Tree). The most common question I faced where we are going to use these stuff.

I am not become judgmental or questioning there IQ. Most of the time these students or fellow juniors lost their mind in everything. They can’t manage their time to understand them in deep drive. My write up is about those people to give them a clear and concrete view of Data structure. There are many books in the market which will be much more resourceful than this post. Also in some cases I may also have to follow them. But you can use my writing as a reference to learn them very easily. Hope this writing will be beneficial.

What is Data Structure

Assume you are setting up your room. While setting up the table you have to put some items in the table. You are thinking you have to keep the pile of the book in the left side and monitor in the right. But suddenly the thought comes to your mind you have to put your mug in some place. Also while keeping the pile of book you remember some of them are more important than other. So, you organize them from more important to less.

You can say the upper case scenario is fully represent a structure. Data structure works like the same way. It is a specialized format to organize the data, so that you can use it of your own way. Assume in your computer program you have to initialize 10 variable. Declare this variable will be a problem cause every time you to initialize it. By using Array you can put it in a list. And simply access them by there index number.

In Wikipedia they quoted the Data Structure as below-

“In computer science, a data structure is a data organization, management and storage format that enables efficient access and modification. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.”

Why I need to learn Data Structure

A compute or a cellphone or a handy device is one of the most important part in our daily life. In the morning you wake up by the sound of an alarm and at midnight you go to sleep after checking your facebook timeline. Our life and technology is now become a married couple. Without one we can’t thin twice. You have to do some assignment to prepare yourself up to date in the modern era you obviously have to be in touch of your device. The people who work behind that kind of technology have their own free time. From a research we can see there are 200000 new updates are publishing everyday to make a person’s life better. A better performance can be the most significant feature of a technological device. But in this job there are a lots of limitation. From memory to power we the developer have to work hard to deliver a smooth and user friendly solution.

In here Data structure can be much more hady. I will discuss it following point-

  1. Memory is one of the biggest challenge in modern era. Through back 2006–08 I am happy with a 40 GB HDD. All my files, music, video are easily managed in these 40 GB HDD. But after 10–12 years later I have installed a 256 GB SSD & 1 TB HDD for manage my file and some situation I get lost. As a developer while I have to work on both computer and Android based Mobile application, first thing I have to keep in mind what is the memory condition (I am talking about primary storage specifically about RAM). I have to write a code which can smoothly in low level devices. Data structure helped me a lot in these case scenario. Do I have to use bubble sort or merge sort I can decide easily by seeing big O notation.
  2. All Programming language are the same. There main objective is the talk with the hardware there own way. They compile, run and do whatever we tell them to do. High level of programming language like Java has a large number of package or super class that makes our work easier. But in the same task you have to do in C or C++ you have to write some basic code of your own. If you have better understanding in Data strucutre you can do that.
  3. We programmer do very code stuff. While I writing code in Android Studio or writing command in Ubuntu Terminal if someone asks, “what are you doing?”. My answer is I am writing some cool stuff. I feel proud and they get bored. They regret why they ask the question in the first place. But we all know we have the power of keyboard and mouse and we all want to do some cool stuff. But I don’t think it’s our primary moto. We are programmer and our primary goal is to solve problem. Solving a problem using different Data Structure it gives you vibe do something much more extraordinary things in a simple and scalable way.

Types of Data Structure

As we discuss before the main reason to start learning and using data structure is to organize the data in your useful manner. Array, Linked list, Tree, Heaps, Hash and many more. As a wise man said one day, “SKy’s the limit of learning something”. There will be no limit to learn about Data Structure.

At the end, the main purpose of this write up to give a slight idea what is data structure and why I, we need theme. In my future write up I will try to write some more about it. Specially try to describe about it more and give example of it. Obviously using coding. For that I will be going to use Kotlin. Till then Adios….

--

--

Hasan Al Mamun

A Software Engineer by profession. Android enthusiastic, love to solve the problem.