DEV Community

Cover image for Learning data structure and Algorithm

Learning data structure and Algorithm

yrajaram112 profile image Yrajaram112 ・1 min read

I am in second semester and I have got this subject in my semester. I am struggling with Data and structure, can't understand concepts,programs. In dilemma of which path to choose to excel in this as we all know how important this subject is for CSE guy.


Editor guide
nevergarden profile image

Data Structures are super important when you want to store data and access them.
There are lots of heuristic data structures but important ones are:

1) Stack
2) Queue

3) Array
4) Map - HashMap
5) List - LinkedList

6) Tree
7) Graph

The way we store them in programs makes the list above and what you have to study is to know which one is faster in which situation.

For example imagine an HTML document, after browser parses the document known as tree:

Store it it's data in some advance tree, then when you for example pass some events that browser has to probe it's nodes to find which node you clicked on.

it's fun when you implement them for example a binary tree has a root and then it has a left and right node:

Node {
   selfData: (Some Data),
   right: Node,
   left: Node

above code is pseudo structure of binary code not implementation
Then next nodes might be initialized or be null.

For learning it I suggest getting to know structures I mentioned above in order on paper (skip any part in book saying how to implement it or discussing it's probing time, insertion time and ...)
Then try to implement them by yourself without looking at book, if you fail it's ok then you have to look online for implementations, if there were none search your textbook for implementation.

Then try to study their advantages and disadvantages so you know how much time it takes to insert, remove, search for data inside them.

yrajaram112 profile image
Yrajaram112 Author

Thanks for your effort.
It's really helpful.