68. Text Justification

time: O(w*L), almot w, words nums

space: O(smaller than w)

readable version

T: O(w*(n+s)), w is words array size, n is list data size, s is space cnt

S: O(maxWidth* rows)

another style

Last updated

Was this helpful?