|
|
вернуться в форумAre the answers in exanples the only solutions or are there maultiple ones!? What we do is we repeatedly move the last bracket to the start of the list. If we have brackets 1234 then we test 1234,4123,3412,2341. On example 1 it is: )(() , ))(( , ())( , (()) ; from which only the last option is OK. Thus the answer is one. Hope that helps. But, why in example №2 answer 2? sequence: )()( 1234 -> 4123 )()( ()() Answer must be 1. |
|
|