Condition for traversing the whole circle:
Let the particle of mass $m$ is attached to an inextensible string of length $R$ which provides the necessary centripetal force along with gravity.
Let the initial velocity be $u$ at the lowest point of the vertical circle. After time $dt$, it moves to some other point transversing angle $\theta$. The height at which it is now located is $$h = R(1 - \cos\theta)$$. Neglecting all non-conservative force, from work-kinetic energy theorem, we get the velocity at the point after $dt$ is $$v^2 = u^2 -2gh$$. The necessary centripetal force is $$T - mg\cos\theta = \dfrac{mv^2}{R} \, .$$
Now in order to move in circular motion, there must be an inward force i.e. centripetal force perpendicular to the instantaneous velocity.
$$v = \sqrt{\frac{R}{m} \left(T - mg\cos\theta\right)}\big{|}_{\theta =\pi} \neq 0$$
In order to have the critical case or the minimum velocity for looping the circle $\left( T -mg\cos\pi\right)$ must be minimum which is possible when the tension $T=0$. Therefore, $$v_\text{min} = \sqrt{gR} \implies u_\text{min}^2 =v_\text{min}^2 +2gh \;\;\;[h = 2R]\, \implies u_\text{min}= \sqrt{5gR} $$.
As the particle moves against the gravity, kinetic energy starts to get converting into potential energy of the system thus reducing the linear velocity. If the velocity becomes zero at the top, it can't have any centripetal force available & it will slack under gravity. And if the initial velocity is less than $\sqrt{5gR}$, then all the kinetic energy would become zero either at the top or earlier.
As said above, if $u \lt \sqrt{5Rg}$, then before reaching the topmost point, tension & velocity become zero at different points. From $$T - mg\cos\theta = \frac{mv^2}{R} \; \text{when} \; T = 0, \\ \implies \cos\theta = \frac{2gh - u^2}{Rg}$$. Substituting the value of $\cos\theta $ in $h = R(1-\cos\theta)$, we get $$h= \frac{u^2 + Rg}{3g} = h_t$$; this is the height where $T = 0$ . Similarly, from $$v^2 = u^2 -2gh \; \text{when} \; v=0\\ \implies 0 = u^2 -2gh \\ \implies h = \frac{u^2}{2g} = h_v$$.
Condition for leaving the circle:
The particle would leave the circle when $h_t \lt h_v \notin h_t =h_v$. This is because when $h_t = h_v$, both tension $T$ & velocity $v$ become zero; but there is gravity pointing downwards. So, when the particle starts to fall under gravity, it gains velocity as well as centripetal force in the form of tension. Hence, the particle doesn't leave.Using the above inequality, we find $$\frac{u^2 + Rg}{3g} \lt \frac{u^2}{2g} \\ \implies 2u^2 + 2Rg \lt 3u^2 \\ \implies u\gt \sqrt{2Rg}$$.
Condition for oscillation:
The particle will oscillate when $h_t\gt h_v$, Why? Because, it is the component of the gravity $mg\sin\theta$ which acts as restoring force for oscillation & $T$ balances the other component $mg\cos\theta$ & if it were not so, then $mg\cos\theta$ would compel the particle to leave the circular trajectory. So, using the inequality above, we get $$\frac{u^2 + Rg}{3g} \gt \frac{u^2}{2g} \\ \implies 3u^2 \lt 2u^2 +2Rg \\ \implies u^2 \lt 2Rg \\ \implies u \lt \sqrt{2Rg} $$. Also, from the above argument, we do get that $u \leq \sqrt{2Rg}$.