Beginner Algorithm Challenges Advice

I started FreeCodeCamp seriously about a month ago, so relatively new. I have started the algorithm challenges and I find them to be very difficult. I find that after hours of trying to figure them out, I need to look up hints and need a lot of help. I find that I still just don’t think like a programmer yet. Did anyone else have this issue? How did you get past it? Any tips?

They’re designed to be self contained problems, and they are simplified, but yeah if you’re a beginner they’re going to be hard. They get used as practise a lot; eg when I’m learning a new language I’ll normally go through a set of problems like this (exactly like some of the FCC exercises, most are standard problems). & Yes they’re trying to make you think more like a programmer. Kinda gets at a core truth that it’s not particularly relevant what programming language you learn as long as you learn one: all of the FCC exercises could be done in any language.

When you do them, they will highlight things you have problems with, that’s what they’re supposed to do. And you can do them over and over again, there generally isn’t one correct answer, and sometimes it just comes down to style. Your first few goes will be bad, you’ll have to look up how to do things a lot. But you’ll be better for the experience: next time will be easier, you’ll start to see patterns, and be able to use techniques you’ve learnt to help solve the other challenges.

1 Like

Hey @andaddis,
first of all, don’t get discouraged if things get difficult. Some problems may only seem hard to start with, but with persistence and perseverance, you can overcome any challenge that you face.

What you need to find out for yourself is why these problems are difficult to you. Is it because you don’t understand what’s required? Is it because you are missing some key knowledge regarding the problem at hand?

What I would try to figure out is what I am lacking. If it is related to programming knowledge, then I would go and learn what I need in that department. If it is not understanding the problem at hand, you can search the forums since you are not the first and certainly not the last, that will face this issue.

Feel free the reply back with specific questions about specific problems you are facing and I’ll try to help out as much as I can.

Good luck

1 Like

If you are new to javascript and programming in general then even the easy stuff is going to be hard at first. It’s “easy” in a relative way, compared to the ones they give you later on that are “advanced”.

The best advice that I can give you is to just keep going. Even if it takes multiple days to figure out the answer, figure it out and understand why it’s working. Every little thing you start to understand is added to the foundation you will end up building off of.

When I first began learning JavaScript I felt like I had no idea what was going on. As I got past the basic and moved to the intermediate sections I started to realize I use a lot of the same basic mechanisms of the language to solve almost every single problem. It starts becoming second nature and one day it just clicks.

If problem-solving is something you love I would say stick with it, it’s worth it in the end.


I think I struggle with connecting everything I’ve learned so far. I’ve read that eventually everything will start to “click.” I don’t think I have reached that point and I don’t think I have the mindset of a programmer or developer yet. I think that this will all come with practice and just keep working at it. But I find that after hours of working on the algorithm challenges, I give up and look at the answers. I found that by looking at the code, I do learn a lot about the code written and I realize the key concepts and that I didn’t fully understand. But I know its cheating and I should strive to do it on my own, but I feel like I’m just not there yet. Do people who are brand new to coding supplement this program with other resources? How do I get past this beginner hump? Any advice would be helpful! Thank you for your response!

It’s really not a big deal that after a month you don’t have the mindset of a programmer. The only person you should compare to yourself is yourself. Are you advancing compared to where you were a month ago?

Other resources I have used in the past were the prep work from the Viking Code School, I also did the free javascript course on Code Academy but it wasn’t until FreeCodeCamps and the challenges in javascript that I really began to get the language on a fundamental level.

If you want a deep understanding of JavaScript there are really good books on the subject. “You Don’t Know JavaScript” is absolutely brilliant and dispells a lot of the myths programmers from other languages bring to JS. A quick google search will give you a plethora of other resources.

When I was going through the challenges I really only read the docs. If you’re having trouble with the beginning challenges it’s because you aren’t really understanding the tools they have given you to solve the challenges so far. So go look up how each thing your using works according to the docs and specs and you’ll start to grasp the tools much better.

It isn’t fun or entertaining but at the end of the day if you want to be a great programmer it’s hard work unless it just comes to you naturally, it did not come naturally to me.

On top of being good practice for problem solving and for honing your JavaScript skills, these algorithms tackle very real issues you will have when working on projects. I have encountered many situations where I went back to my algorithm solutions to solve a real problem. They are very useful in general.
My #1 tip is to break down the problem into as little pieces as possible. This isn’t groundbreaking, it’s what any programmer would tell you. Programming is all about solving 1 thing at a time then putting all those solutions together. If you look at the algorithm challenges most of them you could split into several smaller problems. Good luck!

1 Like

OP - I just wanted to chime in here to say I am right where you are. In fact I found this thread by searching for beginner algorithms are hard! I’m feeling like I’m getting all the basic concepts but writing the actual code without chat code at the ready in the examples above is very much another things. When I do cheat, and I almost always do I make sure to read over the answer and see how close I was and make sure I at least understand the solve. Then later I will go and try again. Good luck to us both!

1 Like

Its not like a test you do in school. It’s not cheating if that’s how you make it stick in your head: nobody’s marking you, you’re not sitting an exam, nobody cares whether you looked at method of how to do it or not because no-one knows except you. If it helps, just do it.

You need to understand it’s going to take you years before you’re actually any good in your first language, with programming in general. Programming doesn’t take huge intellect, it isn’t even hard at the smallest level. Its very similar to learning to play an instrument; the syntax of music is simple enough, easy to learn, and it’s very easy to get to the point where you can play something like ‘Twinkle Twinkle Little Star’. It then takes years of hard practice to actually be good.