Compiler and parsers

Should the sequence always begin with “<”
Is the answer to the input ><> 0 or 2?

Discussing is not allowed in live contests!Please read the guidelines

I wish i could help you but its an ongoing contest. Just a small hint - Give stress on the word “Valid & Longest Prefix”. Combine both and you’ll solve it. :slight_smile:

Read the statement again, It is no where mentioned that expression will always begin with ‘<’

Answer is 0.

Discussions for live contest’s questions is not allowed.

Moreover, for any clarifications comment in question’s page only. For your question : http://www.codechef.com/MAY14/problems/COMPILER

If your question would be genuine, you would get answer there.

<>>>>>><> o/p for this input 9/2

sir how can we give string array of size 10^6 …plz help me

what is the answer of this <<> ?

@dileep2436, please look up tutorials of previous problems. There is a huge treasure out there. You will be able to find helpful hints.