Sort Colors Leetcode Solution Javascript