LeetCode Solution, Medium, 1239. Maximum Length of a Concatenated Stri