multiply polynomial

This commit is contained in:
Krystian Madra 2018-06-28 00:29:45 +02:00
parent 80b3b0983d
commit bf3dacbbc6
1 changed files with 11 additions and 0 deletions

View File

@ -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;
}
}