LeetCode In my opinion, the best solution should be one line and does not use third-party package (using standard operations instead).