For this Question: Given an array of N integers and an integer K, your task is to print the number of distinct elements present in every window of size K.First line of input contains two space- separated integers N and K, the next line contains N space- separated integers depicting the values of the array.

Constraints:-
1 <= K <= N <= 100000
1 <= Arr[i] <= 1000Print (N- K+1) integers, the number of distinct elements for all window of size K.Sample Input:-
6 3
1 2 3 2 2 3

Sample Output:-
3 2 2 2

Explanation:
for the 1st window of size 3, elements are: 1 2 3
thus the number of distinct elements would be: 3
Similarly, for the 2nd window: 2
3rd window: 2
4th window: 2

Sample Input:-
6 4
1 2 3 3 2 1

Sample Output:-
3 2 3, I have written this Solution Code: n,k = map(int,input().split())
l = list(map(int,input().split()))

d = {}


for i in range(k):
	d[l[i]] = i
print(len(d),end=" ")

for i in range(k,n):
	if(d[l[i-k]] < i-k+1):
		d.pop(l[i-k])
	d[l[i]] = i
	print(len(d),end=" "), In this Programming Language: Python, Now tell me if this Code is compilable or not?