Leetcode Counting Sort Algorithm