diff --git a/Main.java b/Main.java index 2bb51b6..066f003 100644 --- a/Main.java +++ b/Main.java @@ -270,6 +270,43 @@ public class Main { return result; } + + + public static LinkedList> nilpotent(LinkedList> elements,LinkedList expect, int mod) { + + LinkedList> result = new LinkedList>(); + LinkedList temp = new LinkedList(); + + LinkedList tempPow = new LinkedList(); + + result.add(elements.get(0)); + + for(int i=1; i= expect.size()) { + temp = dividePolynomials(temp, expect, mod); + } + else continue; + + if(temp.size() == 1 && temp.getFirst() == 0) { + result.add(elements.get(i)); + } + } + return result; + + } + } \ No newline at end of file