This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SomeMath { | |
public static int extendedEuclideanAlgorithm(int a, int b) { | |
ArrayList<Integer> g = new ArrayList<>(); | |
g.add(Math.max(a, b)); | |
g.add(Math.min(a, b)); | |
ArrayList<Integer> s = new ArrayList<>(); | |
s.add(0); | |
ArrayList<Integer> u = new ArrayList<>(); | |
u.add(1); |