Micro1 interview question

A Leetcode Hard related with contactenating strings