So, according to Console output, if array size is 20(even), it fills with : [10,10,10,10,10,10,10,10,10,10,13,13,13,13,13,13,13,13,13,13] Then if array size is 21(odd), it fills as [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,13,13,13,13,13] According to console output, my code met the requirement, If array size is even, fill half of array with start value, half with end value; if array size is odd, fill LARGER part of array with start value, and SMALLER with end value... But my code can't pass the tests...