I’m having a hard time understanding the question.
For eg
Why is the answer to <<<> 0.
it has a valid parenthesis at indexes 2 and 3 right??
prefixLength: prefix: is valid:
1 < false
2 << false
3 <<< false
4 <<<> false
==========
0
1 Like
This solution fails for the following test input:
1
<><<>
1 Like
Yep
the output is 2
I’m sorry I had two windows opened…and gave the wrong link…didnt submit the updated code…
It worked! thanks
1 Like
Neither - it should be 6
:
prefixLength: prefix: is valid:
1 < false
2 << false
3 <<> false
4 <<>< false
5 <<><> false
6 <<><>> true
==========
6
1 Like