- 0
Notifications Mark All Read
- Login
- Get Prime
Coding Question 17
Access Denied!
To view this page you have to login first
Login here -
Trivia
Did you know 1 million people use PrepInsta everyday?
Notifications Mark All Read
To view this page you have to login first
Login here -
Did you know 1 million people use PrepInsta everyday?
def replace(l):
for i in range(len(l)):
m=0
Nl=[-1]
for j in range(i,len(l)):
if l[j]>m:
m=l[j]
l[i]=m
l.pop(0)
l+=Nl
print(l)
l=list(map(int,input().split()))
n=int(input())
replace(l)