Skip to content

Instantly share code, notes, and snippets.

Avatar
📷

Felix Wöstmann felixwoestmann

📷
View GitHub Profile
@felixwoestmann
felixwoestmann / SomeMath.java
Created Feb 7, 2020
Extended Euclidean Algorithm (with complete output)
View SomeMath.java
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);
You can’t perform that action at this time.