Modified the logic how the array (which keeps track about the nr of cycles of each number) is initialized and how its values are updated.