+ 1
Solving algorithms. Feel like ¡bleh!
So I'm in JavaScript.. kind of need a system to figure out how to approach algorithms. how did you or how do you go about solving algorithms, especially when you were new?
2 Réponses
+ 4
Solving algorithms is the thorn in every complex [OO] code [until you love it haha]. The best approach to it is to use graphical models to represent stages or 'states' of your algorithm/function that you can later break apart into segments.
Look into UML diagrams and learn about Deterministic Finite Automata, Non DFA, etc. where you can create complex visual models that can really help understand; Discrete Math, Automata Theory.
*updated add*...
Then you can "attack" the code of each, simpler segment, testing/debugging each if necessary. Hint: Make sure to add comments in the code along the way.