import java.util.*; public class UnitExpression { /** * Input: an int n * Output: the fewest number of 1's in an expression involving only +,*,1,(, and ) which is equal to n, or -1 if no such expression is possible. */ public static int minLength(int n){ return -1; /* *TODO: your code will go here. */ } // minLength(6) returns 5 // (1+1)* (1+1+1) /* * One small test case is provided to help you see what the input and output * look like :) * * You can also modify the provided main method for your own test cases. The main * method will not be graded. You'll only be graded on minLength. */ public static void main (String[] args) { System.out.println("the fewest number of 1's in an expression involving only +,*,1,(, and ) which is equal to 6. The next line should print 5"); System.out.println(minLength(6)); } }