Skip to content

Instantly share code, notes, and snippets.

View brotherko's full-sized avatar

brotherko

View GitHub Profile
@brotherko
brotherko / answer1.py
Created December 9, 2019 13:04
Oursky interview
"""
list to Set: O(n)
Check if b in a: O(len(b))
so the the time complexity will be O(2n + len(b)) : O(n)
"""
class Solution:
def isSubset(self, a, b):
return set(b).issubset(set(a))