If count becomes equal to k , we 've  got the first part, therefore,  store current index and break the loop
if ( cnt == k ) : NEW_LINE INDENT ans = i ; NEW_LINE break ; NEW_LINE DEDENT i += 1 ; NEW_LINE