Doubt in code, i am confused in a sample case

ye code 4 9 2 4 3 4 ke liy chalana , for k=4

ans 1 kaise aayga???

video mei code de rakha hai , i have a doubt in a video

https://online.codingblocks.com/app/player/66903/content/82738/6643/lecture

link of video , ques ki longest subarray of length k

sorry test case is 9 2 4 3 4

for k=4 , and output should be 1