you give 0indexed integer array num in operation replace element array element sum itFor example consider num 567 in operation replace nums1 2 4 convert num 5247return minimum number operation array sort nondecrease order Example 1input num 393output 2explanation here step sort array nondecrease order from 393 replace 9 3 6 array 3363 from 3363 replace 6 3 3 array 33333there 2 step sort array nondecrease order therefore return 2example 2input num 12345output 0explanation the array nondecrease order therefore return 0 Constraints1 numslength 1051 numsi 109