Given an array of integers and a number k, find the maximum for each and every contiguous subarray of size k.
{
"arr": [
1,
3,
-1,
-3,
5,
3,
6,
7
],
"k": 3
}[
3,
3,
5,
5,
6,
7
]{
"arr": [
8,
5,
10,
7,
9,
4,
15,
12,
90,
13
],
"k": 4
}[
10,
10,
10,
15,
15,
90,
90
]{
"arr": [
1,
2,
3,
4,
5
],
"k": 1
}[
1,
2,
3,
4,
5
]Sign in to Run Code and Submit