Basic Algorithms and Data Structures

The Basic Algorithms and Data Structures (Javascript) course is kicking my butt. What are some tips anyone can give that would be helpful when analyzing and breaking down the problems, like a workflow/thought-process?

1 Like

Wow, you are the first person to ever struggle with algorithms. Oh wait, no, the opposite of that, a lot of people struggle with them. I’ve known some very good developers that weren’t very good at them. And with the FCC program, it is a lot of them in a row.

But they do come in handy, they do teach you some useful things. And they often come up on interviews so that is another reason to learn them.

So, take a deep breath, realize that you’re in good company, and don’t be too hard on yourself.

As to how to learn, I think of algorithmic thinking like a set of muscles - the more you use them, the better you get.

How to get good? I think you just have to do them, put in the time. So find a problem. Often I will just mentally work through what’s involved - if I were telling a person how to do this, what would I tell them. Then I might right it out in pseudo code. Then I code.

What if you get stuck and you just can’t go any further? Well, there is always the Get Help -> Get a hint button. There are also expandable solutions. There are also youtube videos of people solving these things. Is that cheating? Yeah. But the most important thing is to learn. Yeah, it’s better if you figure it out yourself, but if you learn it, that’s great too. Always, the few times that I had to “peek” I would just come back and do it again a week later to make sure I truly understood.

Another good thing to do is after you have solved it, seek out other solutions to see how other people solved them.

2 Likes

Exactly the type of response that was needed. I’ve been working through the solutions when I use the hint button, so it reasurred me that comprehension and retention was what’s most important.

Yeah, definitely whether or not you know how to do it is the most important thing.

Just remember that “struggling with a problem” is also important. Forcing yourself to sit down and work through a problem - that’s going to happen in real life. Heck, I’m taking a break from doing exactly that at work right now.