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.
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:
Explain the problem out loud. What is the goal? If you were solving the problem without a computer, what steps would you take?
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.
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.)
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.
I’ve tried them all, but still I am having no idea what so ever how to solve
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,
There’s no shortcut or easy fix here. You just have to suffer like the rest of us.
It’s not suffering >_> I am just frustrated
I found this PDF file http://www.aivosto.com/visustin/sample/roman.pdf
Try using this
Thanks! Wow Should have known about it from before!