You are viewing a single comment's thread. Return to all comments →
nice code, need to learn more in python
my solution is:
def checkMagazine(magazine, note): note.sort() magazine.sort() count = 0 z = len(note) for i in note: if i in magazine: a = magazine.index(i) magazine.pop(a) count += 1 if count == z: print("Yes") else: print("No")
not able to pass 2 testcase due to timeout
Hash Tables: Ransom Note
You are viewing a single comment's thread. Return to all comments →
nice code, need to learn more in python
my solution is:
not able to pass 2 testcase due to timeout