Is it okay if I keep using the 'Get Hint' feature?

Just started with the basic algorithms portion of JavaScript and I keep finding myself having to use “Get Hint”. I feel stupid!

I did try to give myself some time to solve the challenge myself.

Is this normal? Seems like for every challenge I have to use “Get Hint” :frowning:

1 Like

Hi @hassanuddinishak!

Learning how to solve algorithms takes time to get used to.

It is a whole other skill that you have to develop. It is normal for a lot of people to struggle with these in the beginning.

Here is my process for tackling algorithms.

Step 1:
Paraphrase the problem in your own words

It is really important that you understand the problem. You don’t want to be coding for 20 minutes and realize that you misunderstood the problem and have to start over.

Step 2:
Solve the problem without code

Grab some pen and paper (or whiteboard) and solve the problem using one of the test cases.
For example, one of the earlier challenges is to reverse a string.
Forget about the code for a second and ask yourself “How would a human solve this?”
Well you take the end characters of the original word and place them in the beginning of the new reversed word, right? You don’t need any code at this stage.

Step 3:
Write down what you did step by step

Sticking with the reverse a string problem my steps would be.

  1. create a new variable for reversed word

  2. start at end of the old word and grab the last character

  3. Place it in the beginning of the new reversed word.

  4. Continue the process of working end to beginning of old word grabbing one letter at a time and placing it in the new word.

There are many methods to solve this problem but that is the basic idea.

Step 4: Translate your instructions from step 3 into code
Sometimes it will be helpful to have mdn docs open to see what helpful methods you can use to solve some of these problems.

Hope that helps

3 Likes

Hey thanks @jwilkins.oboe!

You really have a lot of interactions within this community and I want you to know that it’s appreciated.

It is really important that you understand the problem. You don’t want to be coding for 20 minutes and realize that you misunderstood the problem and have to start over.

This cannot be anymore true!

Thanks again.

1 Like

There’s nothing inherently wrong with using the guides, but

is not a good sign.

Learning to read and understand code that other people have written is an important skill, but it is not the same skill as learning to solve a problem. Actually working through problems to a solution is something that you need to learn by doing.

It’s pretty common for people to find themselves in a situation where the more they look at solutions, the more often the need to look at solutions. I suggest going back to problems that you answered by looking at the Guide, resetting them, and doing them yourself. I bet that you’ll find that for some of them even though you understood the code you were copying, it’s still pretty difficult to solve without references.

I also always advocate for asking for help on the forum before looking at a solution. Here, we will try to answer your specific questions and nudge you onto the right path rather than just carrying you to the destination.

Good luck and happy coding.

4 Likes