According to the Aufbau principle, electrons first occupy those orbitals whose energy is the lowest. This implies that the electrons enter the orbitals having higher energies only when orbitals with lower energies have been completely filled.
The order in which the energy of orbitals increases can be determined with the help of the (n+l) rule, where the sum of the principal and azimuthal quantum numbers determines the energy level of the orbital.
Lower (n+l) values correspond to lower orbital energies. If two orbitals share equal (n+l) values, the orbital with the lower n value is said to have lower energy associated with it.
Above diagram violets aufbau rule as lower energy is not full filled and electrons are enetred to the higher energy level.