Step 1:-
Let f(x) and g(x) be the given polynomials. First, divide f(x) by g(x) to obtain f(x)=g(x)*q(x) + r(x)
So, deg[g(x)]>deg[r(x)]. If remainder r(x)=0, then g(x) is the HCF or GCD of the given polynomials.
Step 2:-
If the remainder r(x) is not zero, then divide g(x) by r(x) to obtain g(x)=r(x)*q(x) + r'(x)
where r'(x) is remainder. If it is zero, then r(x) is the GCD of the two ploynomials.
Step 3:-
If it is not zero, then continue the process until we get zero as remainder.