Pergunta de entrevista da empresa eBay

Basically is leetcode 68. Text Justification