When is the right time to read other's people solutions to problems?

Hi everyone, I am currently working on the Basic Algorithm section and I feel like I hit a wall on almost every of this sections. I feel clueless staring at the screen and try to piece together some ideas for 20-30 minutes before googling solutions to the problem. While I am able to learn from other’s people solutions and understand them well. I still feel unsure if I am giving up on my own knowledge too soon or not. How long should a person struggle with a problem before relying on external solutions? I want to learn to be able to piece together the tools to solve the problem on my own but at times my mind just go blank because I don’t know where to start. Does anyone have a similar experience and/or advice on how I can tackle this?

The Goal is to learn the material. If sometimes looking over someone else’s solution gives you what you need to understand the material then have a peek. I think you will find yourself doing that less and less as time passes, soon you will know enough JavaScript to Google very specific information about the problem at hand, and then you will be able to find what you need to move forward without looking at someone else’s total solution. The more you can do on your own to solve the problems the faster you will learn.

1 Like

You are definitely giving up too soon, you should avoid the temptation of looking at other people’s solution so soon. You will be able to come up with some sort of solution trust me, its just that staring at the problem or thinking too hard often doesn’t do the trick, you should give it some time.Take a stroll if need be, engage in some other activity and it will come to you subconsciously, of course it won’t happen every time but it definitely helps. You should not sit on a problem for more than 2 days, that i am particularly sure about, if you are not able to come up with a solution by then, you can check out other people’s code and try to understand it line by line like a compiler will execute the solution. Hope it helps.
Good luck!Cheers!Happy coding!

1 Like

Thanks for sharing your insight. I will keep it in mind when I scratch my head at challenges!

I appreciate your advice, it is the kind of advice that I needed to hear. While it is not fun feeling frustrated with the problems that I cannot solve right away, but I will keep at it!

One trick you can use to help get unstuck on trickier algorithms is to write out the problem and what you think the solution might be with a pencil and paper in plain English.

Look at the verbs you are using - they are clues for the built in JS functions/methods you are looking for. The nouns are clues for the variables you’ll need and the data you’ll be manipulating.

You can then try to turn that into a flowchart, to figure if you know what the algorithm should look like.

I have spent a couple of hours a night for up to a week on a couple of the algorithms, which is slower than they probably should take, but the payoff when I finally cracked them was awesome.

1 Like

along the lines of what @JacksonBates said, they will often give you hints in the instructions with the verbs they use and how the instructions are structured.

You’ll learn more if you struggle a bit before looking at other people’s solutions rather than not attempting the problem and looking at other people’s solutions. That being said, 20-30mins is not a long time to be stuck. Take a break if you need to, perhaps overnight, but come back and try again before looking at the solution.