Challenge in solving Algorithms

Hello everyone here,
Am just here really confused because when I tried to solve the challenges of basic Algorithms in JavaScript Challenge, I can not even solve one on my own so please help me clarify like does this one mean I should start studying the whole JavaScript challenge once again or I look for extra resource to study JavaScript.
Please your suggestion is highly welcomed.
Thanks in advance.

1 Like

@19alema To do javascript algorithm scripting you should be familiar with javascript language first. Basic algorithm scripting course tests you how much you learned up-to-now

If you not understating js properties Search in developer.mozilla.org

1 Like

Hi @19alema !

The main issue that a lot of people face when trying algorithms is they think about the code first.

But really you should think about the logic of the problem not how you are going to implement it.

For example, let’s look at the reverse a string challenge.
Instead of diving into code right away, ask yourself how you would solve this challenge with just simple pen and paper without code.

For this problem, you would take the last character of the original word and place it at the beginning of a new word.
Then you would take the second to last character and place that at the end of the new word.
Keep repeating the process until there are no more characters left.

Then you walk through the process and implement into code.

Algorithms help teach you how to problem solve.

Only review lessons that apply to that particular problem.
Don’t go through the entire curriculum again.

Hope that helps!

2 Likes

Yes @jwilkins.oboe is right.

1 Like

To do javascript algorithm scripting you should be familiar with javascript language first.

Just to be clear, these are two different skills - JavaScript and algorithms. There are people who are excellent at JS but struggle with algorithms and vice versa.

Algorithms are just a way of thinking. And each sub-family of algorithms is its own little thing. I think of it like a muscle - the more you do the better it gets. For some people it comes naturally, for some it’s a struggle. And of course, algorithmic thinking is independent of the language implementation - I used to go to meetups where we did algorithm challenges and we all talked about the algorithm, even though we were all working in different languages.

But they can save your life on a project and they often come up on interviews - so their good to know. But it’s also a mistake to think that “you can’t be a good coder if you suck at algorithms”. I’ve known a few awesome developer that struggled with algorithms. And I can think of at least one coder that was great at algorithms, but wrote some of the ugliest, clunkiest code I’ve ever seen.

Just work on them and you’ll get better. Don’t be too hard on yourself. Even if you struggle and have to “peek”, as long as you learned it, that’s what’s important. I had to peek on the internet a few times. I just came back and tried to the the challenge from memory a week later to make sure it stuck in my memory.

3 Likes

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