I will give you one hint: Using 0.5 makes the first and last items half as likely as those in the middle of the array.