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?
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!
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.
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.