Skip to content

Commit bfdaa41

Browse files
committed
update polynomial
1 parent 12a74c0 commit bfdaa41

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

polynomial.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ def add(self, other: Polynomial) -> Polynomial:
8181
small_coefficients = copy.deepcopy(self.coefficients)
8282

8383
if self.len > len(other.coefficients):
84-
large_coefficients = copy.deepcopy(self.coefficients)
85-
small_coefficients = copy.deepcopy(other.coefficients)
86-
84+
large_coefficients, small_coefficients = small_coefficients, large_coefficients
8785

8886
i, j = len(large_coefficients) - 1, len(small_coefficients) - 1
8987
while j >= 0:

0 commit comments

Comments
 (0)