0
Whay algorithm is so important and how can use it in programming ?
6 Answers
+ 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.
+ 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.
+ 1
thank you for your answer but where can I learn it ?
+ 1
Taste, nicely explained. :)
0
What exactly?