Before we go into the actual solution, let us first understand what the critical angle is. It is defined as the angle of incidence within the denser optic medium due to which the angle of refraction equals exactly 90 degrees. It is a special case of refraction in which the beam of light is moving from a denser to a rarer medium (think of a ray of light moving from glass to air!). It’s not called ‘critical’ for no reason - because in this scenario, the refracted light lies right in between the glass and air interface.
For the case where light moves from a denser to a rare optic medium, the equation for refractive index is: