From 8bc941ab4e46ac3f4bc991f320b123f385e6ddaa Mon Sep 17 00:00:00 2001 From: Krystian Madra Date: Thu, 28 Jun 2018 00:31:07 +0200 Subject: [PATCH] substract polynomials --- Main.java | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Main.java b/Main.java index 6d395ba..2e0367b 100644 --- a/Main.java +++ b/Main.java @@ -134,5 +134,34 @@ public class Main { } return result; - } + } + + public static LinkedList substractPolynomials(LinkedList p1, LinkedList p2){ + + LinkedList result = new LinkedList(); + LinkedList p2Copy = new LinkedList(); + + + for(int i=0; i1) { + result.removeLast(); + } + else break; + } + + return result; + } + } \ No newline at end of file