Answer:
N1 sin theta1 = N2 sin theta2 Snell's Law
For the refracted ray to be reflected then sin theta2 = 1
N1 sin theta 1 = N2
Also N2 must be less than N1 for complete reflection
sin theta1 = N2/N1
If you are considering air and glass then N2 = 1 (for air)
sin theta1 = 1 / N2 where N2 must be for glass in this case