gcd problems

Bezout’s identity (also called Bezout’s lemma) is a theorem in the elementary theory of numbers:

let a and b be nonzero integers and let d be their greatest common divisor. Then there exist integers x

and y such that ax+by=d

In addition, the greatest common divisor d is the smallest positive integer that can be written as ax + by

every integer of the form ax + by is a multiple of the greatest common divisor d.

https://leetcode.com/problems/water-and-jug-problem/discuss/83715/Math-solution-Java-solution

See all gcd problems: #gcd

- Review: GCD Problems
- LeetCode: X of a Kind in a Deck of Cards
- LeetCode: Water and Jug Problem
- LeetCode: Max Points on a Line
- LeetCode: Greatest Common Divisor of Strings
- LeetCode: Fraction Addition and Subtraction
- LeetCode: Check If It Is a Good Array

See more blog posts.