A toy car starts from rest at position 1 shown in figure and moves without friction along the loop 12324:-
When h has its critical value, the car will just lose contact with the track at (3) . Then at 3, normal force due to loop vanishes,
mg=mv23r
v23=gr
By conservation of Energy
mgh=12mv23
h=v232g
=gr2g=r2