System Design Problem Leetcode Javascript Practice Code Oscillator