Showing 3 questions
Given a sequence of words and a line width, format the text to fit within the specified width. You must justify the text, distributing extra spaces evenly between words.
#1. Text Justification
You are given an array of positive integers. Determine if you can transform an initial array of all ones into the target array by repeatedly replacing an element with the sum of all elements in the array.
#2. Construct Target Array With Multiple Sums
Calculate the product and sum of the digits of a given integer. Then, return the difference between the product and the sum.
#3. Subtract the Product and Sum of Digits of an Integer