0

Whay algorithm is so important and how can use it in programming ?

11th Oct 2019, 8:08 PM
Hisham Abbas Saad El-Deen
Hisham Abbas Saad El-Deen - avatar
5 Respuestas
+ 3
'Algorithm' just means 'sequence of instructions'. Every code you write is an algorithm. Often a problem can be solved with different algorithms, and some work better than others. Some algorithms work so well or are so useful, that people use them over and over, like binary search, quicksort and so on. That's usually what we mean, when we say 'I want to study algorithms'. But in reality, every code, that accomplishes some sort of goal, can be called an algorithm.
11th Oct 2019, 8:24 PM
HonFu
HonFu - avatar
+ 2
by solving a problem, and carefully observe every step that you take. for example think of sorting a numbers 8 6 4 7 from low to high. oh i'll just move 4 to the first one. think why you pick 4 ? because its the smallest, how do you know its the smallest ? because you see the other number and 4 is the smallest by comparison. so if you retrace the step 1. compare every number until the smallest one found 2. pick that number 3. put it in the front see ? thats the algorithm. and guess what thore are part of algorithm called Selection Sort. just look closer on how you solve a problem with logic.
11th Oct 2019, 9:31 PM
Taste
Taste - avatar
+ 1
thank you for your answer but where can I learn it ?
11th Oct 2019, 8:30 PM
Hisham Abbas Saad El-Deen
Hisham Abbas Saad El-Deen - avatar
+ 1
Taste, nicely explained. :)
11th Oct 2019, 9:37 PM
HonFu
HonFu - avatar
0
What exactly?
11th Oct 2019, 8:34 PM
HonFu
HonFu - avatar