Is this partition algorithm correct?
The goal of the partition is to break the array into two segments. The first segment contains elements [1,2,3,3]. All of these values are less than or equal to four. The second segment contains elements [5,6,4]. All of these values are greater than or equal to four.
The partition function returns where the second segment begins. In this case it starts at index 4.