n,b,d=int(input()),[],[]
k=[int(i) for i in input().split()]
c,e=k[0],k[0]
for i in k:
if i>e:
b.append(i)
e=i
if i<c:
d.append(i)
c=i
print(len(b),len(d))
n,b,d=int(input()),[],[]
k=[int(i) for i in input().split()]
c,e=k[0],k[0]
for i in k:
if i>e:
b.append(i)
e=i
if i<c:
d.append(i)
c=i
print(len(b),len(d))
Hi friends....
In this blog I'm going to give answer for daily test skillrack program, daily challenges and kick start programs and give some coding techniques.
It'll be helpful for u sure and make it usefull
Learn More →
0 Comments