Whats going wrong in my code?
@Harshit-Jha-2364832040305354
Consider a test case:
5
7 3 4 5 2
correct output : -1 4 5 7 7
your code gives : -1 -1 -1 -1 -1
@Harshit-Jha-2364832040305354
Consider a test case:
5
7 3 4 5 2
correct output : -1 4 5 7 7
your code gives : -1 -1 -1 -1 -1