I’m starting my basic algorithm challenges and I feel like a fish out or water. I am using the “Read-Search-Ask” methodology which only ends up with me looking at someone else’s solution. I don’t feel like I am learning anything following this method & I feel like I’m cheating to get the answer. Can anyone offer some advice on what they did to successfully complete these challenges. Thanks!
I can only speak to what worked for me but you are not alone. Every time I look at the new challenge or project description I am thinking “I have no idea how to do this”. But that should not stop you.
Start small, try and break out any project or a challenge into smaller chunks. E.g. “How to reverse a string” => 1. Split string into array of characters 2. reverse that array 3. join up the array into a new string.
Trivial example but same principle applies to every new challenge.
Honestly, I have looked at some algorithmic solutions because I could not get past a wall and just come up with a clever solution looking at a blank page. Nothing wrong with that, however, you should not move forward until you understand the problem and understand the solution enough to explain it to a person who would not know how to do it. Talk it out, write it on the paper, comment it out step by step
Keep the momentum up!
Hey @FrankB, I personally found them very challenging. Now, I haven’t followed FCC curriculum because I already learned most of what I know abroad. But When I did give them a try a while ago I found them very challenging as well. Lately I want to start to apply places so I did some interview challenge questions which are similar to these for some practice. I got better and answered a few without looking at others answers.
For the challenges you have completed, look through the solutions in the Guide. Study them carefully and look for differences between your solution and the basic solution, and then between the basic solution and other solutions. Take care to understand how each solution differs in its implementation and see if you can work out what the benefits of each way might be.
Especially in the “advanced” solutions, you’ll see a lot of unfamiliar methods — each time you see something unfamiliar, look it up on MDN. Make an effort to fully understand it, but if you really can’t get your head around it, make a note and move on. You’ll inevitably come across it again later on.
The nice thing about this process is the frequency of small “eureka” moments. One day you can’t understand what
.map() is for or why you’d ever want to use it, the next day you’re happily using it all over the place and can’t imagine how you ever did without it. Then it’s arrow functions, or closures, or IIFEs, or promises, or lazy evaluation, or type coercion.
For each of these, you’ll have a “lightbulb” moment, but it won’t always come straight away. Sometimes there will be weeks of not-quite-understanding before it finally clicks. And it does require focused study, rather than just guessing until something seems to work.
Thanks for the help! I appreciate it