Swapping two variables

This animation shows how to swap the value of two variables (a,b) using a third variable (tmp).

Summing elements

This animation shows how to sum numbers in an array. In the beginning the value of the sum

variable is zero. We add the value of every element to the sum to get the sum of numbers.

Mirroring the array

This simple animation shows how to mirror the elements in an array.

Searching the maximum

This animation shows how to find the maximum in an array. In the beginning, we copy the first element

of the array to the maximum. Next, we compare the maximum with every other element in the array.

If any of the compared element in the array is bigger than the maximum, we copy it to the maximum.

Searching the minimum

This animation shows how to find the minimum in an array. In the beginning, we copy the first element

of the array to the minimum. Next, we compare the minimum with every other element in the array.

If any of the compared element in the array is smaller than the minimum, we copy it to the minimum.

Searching the index of the maximum

This animation shows how to find the maximum and its index (mi) in an array. In the beginning, we

set the index of the maximum (mi) to 0. Next, we compare every other element in the array with the

element at the maximum index (mi). If we find a new maximum, we set the maximum index (mi) to the

place of the new maximum.

Searching the index of the minimum

This animation shows how to find the minimum and its index (mi) in an array. In the beginning, we

set the index of the minimum (mi) to 0. Next, we compare every other element in the array with the

element at the minimum index (mi). If we find a new minimum, we set the minimum index (mi) to the

place of the new minimum.