Learning Stratagy

Hi there!

I am working through the JavaScript Algorithms and Data Structures, and I am wondering about a “best practices” strategy for learning? Are the delineated structures out there that layout optimal learning patterns for this work?

Here is an example where a known strategy would help: I have spent two-three hours on one problem, searching the internet and writing code that at least is incorporating JavaScript logic, while also taking the given hints into consideration – and the code still won’t test – is it then a good time to get the solution, compare it to what I have written, taking notes to grok the difference, and moving on to the next problem?

Any advice as to how best to approach the material for success would be greatly appreciated.

Thank you!

1 Like

I always recommend against looking at the solutions before you have solved the problem.

Analysing the code of others and developing your own solutions are two completely separate skills. Both skills are important, but reading a solution will not help you write your own solutions on your own.

I am a big fan of Read-Search-Ask.

Read - Read the question carefully, breaking down the task and coming up with a plan of attack.

Try to implement your plan of attack. What are your sticking points? Do you need to revise your plan? If so, GoTo Read. Do you need more information? If so, GoTo Seach.

Search - Search for any missing information you may need in order to complete the task.

Revise what you have tried so far. Do you need to revise your entire plan of attack? If so, GoTo Read.

Try to implement your plan of attack. What are your new sticking points? Do you need to repeat Searching for information? If so, GoTo Seach. If Seaching isn’t helping, GoTo Ask.

Ask - Formulate specific questions that will help you get un-stuck and ask them to other developers, such as here on the forum.

Repeat steps as needed.


Hi @SevenRoot !

I don’t think it is unheard of to spend a while on some of the more advanced challenges.

When you start building projects, the same thing will happen.
You spend a while fixing bugs or refactoring code.

I also think you should ask more questions when you need someone to help point you in the right direction.


Much appreciations for the input, friends!

This is a great point. Learning how to solve algorithmic challenges takes much more time than learning syntax. Syntax is about replicating that you see. Algorithmic problem solving is about innovation and creation.


Nearly every problem in that section can be further divided into sub-problems. Think about the smallest possible problems first and try to solve those. Then inevitably as you solve the tiny problems, you can start putting them together to solve the bigger problems, until finally you have the solution.

Learning to master problems of that type is mostly about pattern recognition of the small sub-problems and knowing how to put them together to solve bigger problems - i.e. once you know and master fundamental array methods like indexOf(), push(), shift(), splice(), and others, most complicated problems become about using a mix of them.

Also in general, the best and most elegant solutions will involve functional JavaScript - i.e., chaining together multiple array methods.


This is really a great question! I think many of us have the same problem once we reach this section…it’s been great up to this point, but here’s the deep end!!!
Colt Steele has a helpful course on Udemythat covers many solutions to these type of problems and helps you to learn by taking you through the solution to several types of patterns. But I’m afraid success in this area requires lots of patience; I’m still working through it after more than a month of finishing the basics sections.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.