From c832ac61977b41456d0b1fcb9d936ec8815c1254 Mon Sep 17 00:00:00 2001 From: Krystian Madra Date: Thu, 28 Jun 2018 08:33:25 +0200 Subject: [PATCH] reversible poly --- Main.java | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/Main.java b/Main.java index 066f003..06d4472 100644 --- a/Main.java +++ b/Main.java @@ -307,6 +307,45 @@ public class Main { } - + public static LinkedList> reversible(LinkedList> elements,LinkedList expect, int mod) { + LinkedList> result = new LinkedList>(); + LinkedList temp = new LinkedList(); + + for(int i=1; i nwdPoly(LinkedList p1, LinkedList orig, int mod) { + + LinkedList temp = new LinkedList(p1); + + while(p1.size()>1) { + if(p1.size() <= orig.size()) { + temp = dividePolynomials(orig,p1,mod); + orig = p1; + p1 = temp; + } + + } + return p1; + } } \ No newline at end of file