Reactjs Sort Array Leetcode Problems On Strings