You are given an integer array widths of length s. The array widths indicates the width of each lowercase English letter, where widths[0] is the width of 'a', widths[1] is the width of 'b', and so on up to widths[25] for 'z'.
You start writing the characters of s line by line from left to right. Each line has a maximum width capacity of
Return an array of two integers where the first integer represents the total number of lines used, and the second integer represents the width used on the final line.
Constraints:
widths.length
widths[i]
s.length
s contains only lowercase English letters.
You are given an integer array widths of length s. The array widths indicates the width of each lowercase English letter, where widths[0] is the width of 'a', widths[1] is the width of 'b', and so on up to widths[25] for 'z'.
You start writing the characters of s line by line from left to right. Each line has a maximum width capacity of
Return an array of two integers where the first integer represents the total number of lines used, and the second integer represents the width used on the final line.
Constraints:
widths.length
widths[i]
s.length
s contains only lowercase English letters.