Problem with my code

My code is giving wrong answer pls look into it


you can check this out once, for the code and approach, this one will pass

https://ide.codingblocks.com/s/316186 this is link to my code pls correct it

if(cnt==sizep)

 {

     char temp=s[start];

     while(FP[temp]==0 || FS[temp]>FP[temp])

     {

         FS[temp]--;

         start++;

         temp=s[start];

     }

     int window_len=i-start+1;

     if(window_len<min_len)

     {

         min_len=window_len;

         start_idx=start;

     }

 }

problem is in this loop


fixed here
also try and run it on leetcode for test cases