I feel so stuck in the algorithm challenges 😔

I’m currently doing to front end intermediate algorithm challenges and it is a daily experience for me to write the code run it and have it inevitably fail. I don’t mind it failing so much as the fact that it can take me as long as 3 hours to be able to finally get it to work :frowning:
Am I doing something wrong? Should it really take this long?
I really need advice, I don’t think I can continue programming if everyday will be as hard as this. I have to drag myself to the computer and am really easily distracted because I don’t feel like I’m doing anything :persevere:
any suggestions would be appreciated, thanks

Don’t feel like that!!! It’s ok, and it’s a process!!! Many feel the same as you… I’ve felt the same before… Sometimes spent days in just one challenge… I’d like to share one answer I wrote in other post, I’m sure it will give you more energy!!!

Thanks!Tthat really makes me feel better; I love what you said about being independent. I usually give up and look up a tutorial or look at freecodecamp’s answer after 2 hours of debugging and stress. Is that bad? Should I keep going longer?

I’m glad the motivation words helped!!! I got so many nice words from the community too… It’s great to have this community.

About going longer, give up, look tutorials and answers… well, it’s hard to say… I guess you’ll find your pace.

Of course there’s no point in staying like 2 hours with no evolution, so it’s good to get some hints and try to overcome one step that you got stuck,… but same time there’s no point in getting the complete solutions in every challenge.

If you spend ten hours in a challenge, but many of these hours you spent reading docs and trying (getting used to) some properties and methods, (Ex.: Array.forEach( ), String.join( ) ) …then you’re doing pretty good, because you’re actually learning, testing and you’re building a solid undesrtanding for your future.

Keep going! There will be easy ones and hard ones, don’t rush, take your time… sometimes leave it at night and try to tackle next morning, with a full relaxed brain… It helps a lot!


Thanks! Yeah, sometimes I’ll just be staring at the computer screen being like "I honestly have no god damn clue how to solve this ":sweat_smile:. But yeah, I think I’m gonna start sticking with challenges longer before giving in. I’m gonna start using all my resources: documentation, hints, and posting my problem on help, whatever.
Thanks for the guidance :+1:

1 Like

Yeah i struggled, but it taught me a lot about debugging and logic when coding. Everyone struggles, i’m not saying that in a cheesy way, i’m saying that in a way that coding is very hard but very satisfying once you figure something out. Its great for increasing your problem solving and logic skills. Its also keeps your brain active, watching TV 12 hours a day is not good for your brain. Coding is like a playground for your creativity, Its also a very useful skill too.

This is the quote i always think of when i’m coding.

Getting stuck on one algorithm problem for days or weeks is a waste of time. There’s no value to taking that long to solve one of those questions. Most of the time you have the algorithm thought out and are approaching it the correct way and you just have a simple syntax error, or at least that’s the case with me.

Try them for a couple hours. If you get stuck look up the answer and understand how it works and why your approach didn’t.

Smallest Common Multiple took me 2 weeks.

After a week of banging my head against it, I did some Khan Academy to figure out the maths I was missing.