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!

:v:ļø:smiley::man_technologist::woman_technologist::raised_hands:

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.