feat: Initial commit

This commit is contained in:
2024-03-22 17:01:42 +01:00
parent 954985f39a
commit c343ff6e93
106 changed files with 143428 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
def removeDup(a):
i=0
while i < len(a) - 1:
if a[i] == a[i + 1]:
a.pop(i)
else:
i += 1
def sameSet(a, b):
cpa = list(a)
cpb = list(b)
cpa.sort()
cpb.sort()
removeDup(cpa)
removeDup(cpb)
if len(cpa) == len(cpb):
i=0
while i < len(cpa):
if cpa[i] != cpb[i]:
break
i += 1
if i == len(cpa):
return True
return False
print(sameSet([1,5,2,4,4,8], [1,1,4,2,8,5,5]))