https://practice.geeksforgeeks.org/problems/word-wrap/0 code example
Example: https://practice.geeksforgeeks.org/problems/word-wrap/0
Input: nums = {3,2,2,5}, k = 6
Output: {{1,1},{2,3},{4,4}}
Explanation: Given a line can have 6
characters,
Line number 1: From word no. 1 to 1
Line number 2: From word no. 2 to 3
Line number 3: From word no. 4 to 4