Partition Array According To Given Pivot Leetcode Solution