Leetcode Solutions In Javascript Object Destructuring In React