A sudden realization of the solution to a problem is called insight.
The term insight stands for problem solving. If the solution to the problem occurs suddenly in conscious then that is a insight in problem solving.
The first stage of the insight is working on the problem without solving it.The second stage of insight problem solving is incubation, the third stage is finally producing the insight and the last one, the fourth is verifying that the insight is correct.