Open rimaout opened 1 month ago
def es(p):
s = p
f = p
while f.next != None:
f = f.next
while true:
if f.val != s.val:
return false
f = f.prev
if f == s:
break
s = s.next
if f == s:
break
return true
def es3( p , s1 , s2 ):
if p.next != None:
return es3( p.next , s1+p.val , p.val+s2 )
s1+=p.val
s2=p.val+s2
if s1==s2:
return "SI"
else: return "NO GAY"
def es(p):
q=p
while q.next!= None:
q=q.next
while p.next != None and q.prec != None:
if p.key == q.key:
p=p.next
q=q.prec
else:
return "NO"
return "SI"
Soluzione Prof