The algorithms 🔥

Hi, I’ve been trying to do the intermediate algorithms and it’s very very challenging and hard to me. I’m trying to write down on paper and try to get some patterns but still I am not able to finish them. It’s taking me days to finish one algorithm. I need advice. :frowning:

1 Like

Are you using the resources provided on the algorithms page?

In terms of how to approach a difficult problem, I might try something like this:

  1. Explain the problem out loud. What is the goal? If you were solving the problem without a computer, what steps would you take?

  2. Look at a couple of the test cases. Solve the problem - on paper, or out loud - for one or two of the test cases. Maybe jot down what steps you took.

  3. Try to translate your steps into code. If you’re still stuck, take a look at the resources given. Try to figure out how to use the functions listed. Play around with the functions and try to get them to “work” for simple test cases. (You can use your browser console for this.)

  4. If all else fails, look for hints in the FCC wiki. Read one hint, try to solve the problem, and only look at the next hint if you’re still stuck.

2 Likes

I’ve tried them all, but still I am having no idea what so ever how to solve

@udayk8139 hello!

Have you tried searching wikipedia for more formal algorithms and then rewriting them in code? I recently published an article about my take on an LCM algorithm using recursive functions: https://forum.freecodecamp.com/t/recursive-functions-finding-the-lcm-medium-post/88210
It might help you get an idea on how to write your own algorithms!

Have a good one,
Ethan

1 Like

There’s no shortcut or easy fix here. You just have to suffer like the rest of us.

1 Like

It’s not suffering >_> I am just frustrated

I found this PDF file http://www.aivosto.com/visustin/sample/roman.pdf :open_mouth:

Try using this

Thanks! Wow :heart: Should have known about it from before!