Partition Array Into Two Parts Leetcode Javascript Questions W3schools