def findTarget(myList, target): count = 0 for item in myList: if (target == item): count = count + 1 return count
有人告诉我这是0(log)n虽然我相信这是0(1)?有人可以确认还是否认?
python complexity-theory list
complexity-theory ×1
list ×1
python ×1