• + 0 comments

    yes, what you say is correct, BUT, considering the different test cases that might test this , you could get an input of TTTYYYUUUDDDDUUDD where T and Y are not U and D , and those could broke your method, if you doble check for U and D only , you are considering just those two letters, and that is what the problem suggests to check for.