Leetcode Max Width W3schools Javascript Function