Again Correct out put but wrong answer

,

I will be glad if you can find whats the issue in this Solution also i modified it for the blank inputs Solution Modified
Please help me…

1 Like

Run your code at the following testcase, You will find your bug!

1
LTIMEMITL

Excepted Output: YES
Your Output: NO

More Precisely, you need a slight change at Char[4]:

if (Char[0] >= 2 && Char[1] >= 2 && Char[2] >= 2 && Char[3] >= 2 && Char[4] >= 1)
    {
      printf("YES\n");
    }
    else
    {
      printf("NO\n");
    }
2 Likes

Thank you so much bro, you are amazing.

		else if((size==9)&&(Char[0]>=2&&Char[1]>=2&&Char[2]>=2&&Char[3]>=2&&Char[4]>=1)){
			printf("YES\n");
		}

One more condition was needed for this. :grinning:

1 Like