In the last lessons of Informatics we have been learning about Algorithms: what they are and how they work, and to do this we saw a few videos to help us understand.
Algorithms are everywhere and they are essential our daily life. They are ancient and are a set of instructions that writes on itself. We can’t live without them. Even when we are baking a cake or playing chess we are following an Algorithm. They can be described as a set of rules for solving a problem in a finite number of steps.
In the videos we saw examples to types of algorithms like the sorting algorithm (merge sort, bubble sort, etc) and ways to solve algorithms such as the pseudocode.
Merge sort algorithm:
John von Neumann invented a sorting algorithm called merge sort, which is divided into parts.
The first part is the dividing part, in which we separate everything into smaller groups.
The second part is the conquer part and consists in merging the groups back together, but as we do this we compare the sizes of the objects one pair at a time so that the merged group becomes sorted. The merge sort algorithm is used to sort a large number of objects, because it works faster than other tipes of sorting algorithms like the bobble sort.
No comments:
Post a Comment