[Community Puzzle] Ted's compiler

https://www.codingame.com/training/easy/teds-compiler

Send your feedback or ask for help here!

Created by @MAWAAW,validated by @codingcri,@Ayza and @FredericLocquet.
If you have any issues, feel free to ping them.

Hello,

first test in python3 seems wrong. Specs say " each > symbol must exactly match a < symbol"
but this is not the case:

Standard Output Stream:

<<>>>
it expects 4, shouldn’t it be 0 ?

Best Regards,
LFR

The longest valid prefix is <<>>
Length: 4

1 Like

thanks @pardouin , now I got it. I thought that the full string should be valid.

I feel as though this is missing a test case - e.g. <><<<<<<<

Hello Everyone.
Can someone help me to understand how 0 can be expected for this ><<>> ?
and where are the 14 expected in this <><><><<<<>>>>>>><<<<>>>><><><>><<<<>>>><>>><><<<<>>>><><><>><<<><<<<>>>><><><>><<<><><><><><<<<>>>> ?

You are looking for the longest valid sequence starting at 0, not the longest one into the whole string

You are looking for the longest valid sequence starting at 0, not the longest one into the whole string

Thanks @darkhorse64 , your comment just helped me solve it. (The instructions should really be more clear about that)

1 Like

Instructions were not clear for me either. Thanks God the forum still exists.