diff --git a/Main.java b/Main.java index 62a28a9..adab3b2 100644 --- a/Main.java +++ b/Main.java @@ -87,4 +87,15 @@ public class Main { return result; } + public static LinkedList multiplyPolynomial(LinkedList p1, int multiplier){ + + LinkedList result = new LinkedList(); + + while(!p1.isEmpty()) { + result.add(p1.poll() * multiplier); + } + + return result; + } + } \ No newline at end of file