Leetcode Basic Problems In Javascript How To Convert