Это был вопрос интервью, который у меня был, и я был довольно смущен этим. Хотел знать, может ли кто-нибудь придумать ответ на него и предоставить для него большую нотацию.
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
Вы не можете изменить строку. Вы можете использовать операторы умножения для вычисления числа.
например. String = "312"
, 1 оператор умножения
Вы можете сделать 3*12 = 36
или 31*2= 62
. Последнее, очевидно, является правильным ответом.