Creating a DP matrix in which ith cell representithugly number. Start filling the dp matrix fromi = 2. Uglynumber(i) = minimum of (2*ugly number(f2), 3*ugly number(f3), 5*ugly number(f5)). Finding the answer using above relation and storing it atithindex. ...