DEV Community


Discussion on: Daily Challenge #249 - Incremental Changes

momandalex022 profile image
Christine Marshall

oh i am a complete beginner all i know is html and css and i don't even know if they can be considered a language... but i was listening to a podcast on what algorithms were and she said that even a recipe is an algorithm so isn't an algorithm like a pattern, like in math? like maybe if the pattern is this then the answer is that?
i was just doing it in my head but i guess doing it in a language would be much more difficult but now i understand that you are looking for a way to make it simpler and more efficient right? i think i am still a little confused on this i will have to get more of an intro to algorithms before i try to crack any codes... thanks for being nice to the newbie!
Christine can i ask what an iteration is?

Thread Thread
not_jffrydsr profile image
  1. I may be in the minority, but I'd consider CSS + HTML at least non-turing complete languages.👍🏿

  2. ...though it'd behoove you to graduate to a turing complete language like Ruby or JavaScript.

An algorithm is an unambiguous method of solving a specific problem. - Wiki

  1. An example of an algorithm is a recipe, correct. The opposite could be called a heuristic, but it's not a discrete line to draw now that Machine Learning uses some stochastics for it's results.

It's very exciting to see a beginner grappling with these concepts and potentially create fresh examples and metaphors.

  1. As far as the DC - an example of an iteration is a cycle. - Your washing machine has several spin cycles and probably saves the sequence in a list (or array). The machine iterates through each cycle in that list till the process (or algorithm) is complete. In this case, an iteration would be each 'pass' through some block of code that's looping either explicitly or recursively.

If nothing else, a well-worded recipe for getting the sum is valid. ✌🏿