Smallest Substring Of All Characters Leetcode Javascript Practice