The Data Structure, Algorithms, and so on!

Mehran
6 min readNov 7, 2021

--

Photo by Karsten Winegeart on Unsplash

I refrain from pushing other engineers to have the same view on DSA as I have. But there are certain things that I can’t shut up about. Understanding them has helped me tremendously to deal with my frustration while I was learning DSA, and as my way of giving back to the community, I recommend you to read this post till the end.

If you have a computer science background, you are familiar with the concept of DS and Algo. Still, If you started your software engineer career by participating in code camps or self-learning, then there is a chance you missed the party!

Why do I need DSA?

The list of discussions around DSA is long and growing, But one thing that became clear and has been clear ever since is that many software engineers don’t see any value in learning it because they don’t use them in their day-to-day job.

Most engineers don’t need to have a profound knowledge of DSA to work on their tasks. For instance, a front-end engineer must understand the basic DS like an array and perform certain actions like search, filter, map, etc. Still, she can use built-in APIs for all of these operations, so it’s fair if she says I don’t need it.

However, over the last few years, Many realized that their dream job in FANG is entangled with DSA, and there is no workaround;

Bumpy Path

Frustration and confusion are part of getting better at DSA. You probably want to learn DSA because it’s a requirement for a job you are applying for, so let’s talk a bit about challenges.

The First challenge — where to start?

The insane amount of options for learning DSA is enormous. Videos, books, blog posts, websites, etc. It could be overwhelming and confusing to choose the best one, and the truth is that there is no best source for learning DSA; each has its pros and cons.

As someone who began learning these topics a long time ago and is still learning, I can tell you that no single source of learning could teach you everything. You might end up looking at many sources to understand one concept, and this pattern goes on until you pass the interview. Get comfortable with it!

Learning DSA is like hiking; it never gets easier; you get stronger, but there is always an unfamiliar question or concept that surprises you even after hours of studying. When you encounter such a situation, please don’t blame yourself; it happens to everyone!

The second challenge — How long does it take to be good at it.

There is no fixed timeframe for it, so if someone tells you that you need three or six months, she is probably talking about her experience that could be entirely different from you. Learning DSA has two spectrums.

  1. Learning basic
  2. Practicing
    2.1 Early Stage
    2.2 Advance Stage

If you directly jump to LeetCode or HackerRank to learn DSA, then you are disappointing yourself. Before that, you have to discover the basics. Knowing the basics is like understanding the question, but you still cannot answer it.

After learning the basics, you enter the early stage of practice, which means studying others’ answers to problems and making sense of it. This stage could be long and confusing because you are trying to connect the dots, recognize how to analyze a problem, and solve it. Don’t forget that you are still learning, so lower your expectation.

The Early stage of practice ends when you feel comfortable solving problems independently, which vary from person to person. Don’t compare yourself with others; you might get comfortable after analyzing 100 questions or 300 or even more, but the number doesn’t matter. Continue this stage till you gain confidence! You know when you are there!

You enter the advanced stage after the early practice stage, which signifies you probably can follow the question and develop some rough solutions. Once you get there, it indicates you have entered a never-ending path. There is no finish line for learning DSA, you get better after solving each mystery, but there is always more to learn.

The Third Challenge — When to stop?

The short answer: No one knows! But some indicators could help you.

  1. You can understand the questions.
  2. You can track famous patterns in each question.
  3. You can visualize the solution before writing the code.
  4. You can come up with the not so perfect solution (first version)

For many companies, the DSA stage of the interview is to find out how you deal with unfamiliar problems. So as long as you can understand the question and come up with the rough solution and communicate it with the interviewer, you are halfway through. The rest is the optimization and addressing edge cases.

Chance plays a role in DSA interviews; You might get a question that you already know the answer or the interviewer goes easy on you! Try to prepare for the worse and hope for the best.

Don’t trust too much.

Many YouTubers that teach DSA acts like they know everything, and they come up with the solution and code in no time. Well, this is impossible; they are not as good as they show! They mostly look at the question and answer beforehand, then sit in front of the camera and record it. Learn from them, but don’t look at them as a hero or someone you want to be!

Goals

When you are learning a complex concept, you have to connect it to a goal; otherwise, disappointment and frustration levels peak, then you have lower motivation and productivity.

Getting a dream job seems a sustainable goal to help you go through the thorny learning path. If you think the dream job is not a perfect goal to help you continue your learning path, you can connect it to a financial plan that you can achieve by having a better job in a company that pays you a higher paycheck. If you sit in front of your laptop and start learning DSA without any apparent purpose, the chance is high that you drop the ball after some time.

Could knowing DSA help your day-to-day task?

This is also another controversial topic around DSA. Some believe that by solving challenging problems, you are training your brain to think outside of the box that could indirectly help you in other aspects of your work but for sure, by knowing DSA only, you cannot be a dependable engineer.

You can solve all the problems in LeetCode and still write horrible code that is not testable and maintainable. On the other hand, you can be a decent software engineer that everyone loves to have you onboard, but you cannot write a function for traverse Graph or find the next permutation of a numeric sequence.

So the answer is that DSA is one tool in your toolbox, and for sure, it has its benefits but not every task requires using this tool.

Be realistic

As I mentioned many times in this post, learning DSA is hard, and for the most part, it is not fun! But knowing DSA and being good at it is a must for getting the job you dream about.

Each person has different abilities, some learn DSA faster than others, and some can memorize stuff better, but in the end, everyone can be good at DSA; just the amount of time and effort is different from person to person.

Don’t forget that no one, absolutely no one, can be good at DSA without studying them; The most important thing you have to keep reminding yourself is your goal and why you want to learn DSA.

Please don’t compare yourself with anyone; learn from others and their mistakes but compare NO!

Be Persistent

If you know the meaning of Persistent, then you know what I mean!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Mehran
Mehran

Written by Mehran

Tech Team Lead | Cloud, Video & Microservices Expert | Insights on streaming innovations & programming. #ContinuousLearning

No responses yet

Write a response