multiply polynomial
This commit is contained in:
parent
80b3b0983d
commit
bf3dacbbc6
11
Main.java
11
Main.java
@ -87,4 +87,15 @@ public class Main {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static LinkedList<Integer> multiplyPolynomial(LinkedList<Integer> p1, int multiplier){
|
||||
|
||||
LinkedList<Integer> result = new LinkedList<Integer>();
|
||||
|
||||
while(!p1.isEmpty()) {
|
||||
result.add(p1.poll() * multiplier);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user