You are viewing a single comment's thread. Return to all comments →
2 lines in python does the work.
s=[input() for s in range(int(input()))] [print(s.count(input())) for j in range(int(input()))]
first line stores the inputs in a list. second line counts the occurances of present input in the previous list.
Seems like cookies are disabled on this browser, please enable them to open this website
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →
2 lines in python does the work.
first line stores the inputs in a list. second line counts the occurances of present input in the previous list.