Three Way Partitioning In Leetcode