My issue
I am not able to create a much better logic so that my code becomes more efficient
My code
# cook your dish here
def search(A,n):
count=0
for i in range (n):
for j in range (n):
if i+1==A[j]:
# print(i,A[j])
count+=1
break
print(count)
t=int(input())
for _ in range (t):
N=int(input())
dolls=[]
for i in range (N):
x=int(input())
dolls.append(x)
search(dolls,N)
Learning course: Arrays, Strings & Sorting
Problem Link: Practice Problem in - CodeChef