Time complexity

can you pls explain the TC of the deque approach?

@pradhumangupta99

Input:
9
1 2 3 1 4 5 2 3 6
3

max({1,2,3}) = 3
max({2,3,1}) = 3
max({3,1,4}) = 4
max({1,4,5}) = 5
max({4,5,2}) = 5
max({5,2,3}) = 5
max({2,3,6}) = 6

Output:
3 3 4 5 5 5 6

I wanted to know about the Time complexity?

@pradhumangupta99,
TC = Test Case or Time Complexity…?? Non standard acronyms… not the best form of communication…

I think this problem can be done in O(n*log(k)).