DEV Community

CEO
CEO

Posted on

How to learn Data Structure

Data Structure, two words that awake every coder, it seems like a monster (it is, partly) because it is difficult at first.

By being difficult, a lot of beginner quit before they succed...
It is not meant to be like this, but How Can You Learn Data Structure?

Learn the Basic

Your First Problem

Now, that you are all set, pick an easy problem like the Contains Duplicate one.

  1. Read carefully the problem and tell yourself: what is the problem asking me?
  2. Think LOUDLY, it stimulates your brain thinking, and try to code a pseudo-code even on paper.
  3. Now, you can code your solution, it doesn't have to be the optimal one but the one that works.
  4. Ask yourself, Can I optimize my solution?
  5. Search on Google, other solutions and other data structure, like: binary search, hashmap (these are famous).

The TRICK is to not give up and if you are stuck on a problem, even if it is an easy one, learn the solution and learn why it works.

If you do this trick, you can't be stopped

From a coder, to a coder. Happy hacking !

If you have any question or any tips, write in the comments, it may help someone .

Top comments (0)