tenRun: spread each multiple of 10

For each multiple of 10 in the given array, change all the values after it to that multiple of 10, until you reach another multiple of 10. So {2, 10, 3, 4, 20, 5} gives {2, 10, 10, 10, 20, 20}. Step through tenRun: max remembers the most recent multiple of 10, and -1 means "haven't seen one yet". This code changes the array it was given and returns it.