MCPcopy Create free account
hub / github.com/careercup/ctci / isEqual

Function isEqual

python/Chapter 2/Question2_7.py:89–100  ·  view source on GitHub ↗
(L1,L2)

Source from the content-addressed store, hash-verified

87 return reverseL1
88
89def isEqual(L1,L2):
90 curr1 = L1.head
91 curr2 = L2.head
92 while curr1 != None and curr2 != None:
93 if curr1.value != curr2.value:
94 return False
95 curr1 = curr1.next
96 curr2 = curr2.next
97 if curr1 != None or curr2 != None:
98 return False
99 else:
100 return True
101
102
103for i in range(27):

Callers 1

isPalindromeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected