Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Let say you are building a compiler. The compiler you are building only understands angular brackets < and >. Since you must have already written a program in C, C++ or Java, you know that every opening curly bracket { should have corresponding closing } curly bracket else you get a compilation error.
Similary the compiler that you are building will give compilation error if every opening angular bracket < does not have a corresponding > closing bracket.
You aks your friends to write a program for this compiler using only angular brackets and they being a good friend have given you few codes. It might happen that if you compile the code it might give an error but if you compile its prefix it might run. Given a code you have to find the length of the longest prefix. In case no such prefix exists just output 00.
Note: <<><< ,>><< will give compilation error, while <>, <><><>, <<<>>> will not.
Example
Input
3
4
<<>>
2