Sort Color Problem Leetcode Javascript