Minimum Number Of Platform Leetcode Javascript Question