Well, I don't know about algorithm, however for such problems I suggest you to just plot and understand what's going on. For example you know that the circle $C$ has radius 2 and is centred at the origin. While the line $y = x + d$ is parallel to the bisecant of the first and third quadrant in the carthesian plane.
Hence by simply taking $y = x$, you intersect the circle in two points.
In general, to find all the values $d$ that would give you this result you need to find where the line intersects the circle in one point. This happens when the line is TANGENT to the circle. How do you find this? well it's pretty simple, just put $y=x + d$ into the equation of the circle, to get:
$x^2 + (x+d)^2 = 4$. Now use algebra and get $2x^2 + 2dx+d^2-4 = 0$.
From this you can use the standard formula and obtain:
\begin{equation}
\frac{-2d \pm\sqrt{4d^2-8(d^2-4)}}{4}
\end{equation}
Now, the standard formula for $ax^2+bx+c=0$ would be $\frac{-b \pm\sqrt{b^2-4ac}}{2a}$. You can see that part of it is underneath the square root, hence it MUST be POSITIVE.
This thing has a name, it's called the determinant, often denoted by $\Delta = b^2 -4ac$. You can see that if this is negative, the quadratic formula has no solutions.
If it is equals to zero, then you have one solution (well, actually you have two, but they are the same number). If it is positive, then you have two solutions.
When does this happen?
$\Delta = 0$ when $b^2 = 4ac$, $\Delta > 0$ when $b^2 > 4ac$ and $\Delta <0$ when $b^2 < 4ac$.
In your case $\Delta = 4d^2-8(d^2-4) = -4d^2+32$, hence you have:
- $\Delta = 0 \rightarrow d^2 = 8 \rightarrow\,\, d = \pm 2\sqrt{2}$
- $\Delta > 0 \rightarrow d^2 < 8 \rightarrow \,\,2\sqrt{2}< d < 2\sqrt{2}$
- $\Delta < 0 \rightarrow d^2 > 8 \rightarrow\,\, d > 2\sqrt{2\,}$ or $\,d < -2\sqrt{2}$
What does this tell us? Well when the discriminant is positive, you have two solutions, so you have two intersections. When it is equal to zero, you have one point of intersection and when it is negative, you have no point of intersection.
So if you take either $d = \pm 2\sqrt{2}$, you'll get one intersection, if you get $-2\sqrt{2} < d < 2\sqrt{2}$, then you have two points of intersection, while if $d > 2\sqrt{2}$ or $d < -2\sqrt{2}$, then you have no points of intersection.