Given a string of numbers and a number of multiplication operators, what is the highest number one can calculate?
This was an interview question I had and I was embarrassingly pretty stumped by it. Wanted to know if anyone could think up an answer to it and provide the big O notation for it. Question: Given a string of numbers and a number of multiplication operators, what is the highest number one can calculate? You must use all operators You cannot rearrange the string. You can only use the multiplication operators to calculate a number. E.g. String = "312" , 1 multiplication operator You can do 3*12 = 36 or 31*2= 62 . The latter obviously being the right answer. I am assuming here that the required