yaar its a simple concept in which often people get confused.....
just remember that electrons get filled up first in a lower energy level and then in a higher one...
irrespective of the numerical order.....
energy level can be determined by n+l value.......
just remeber it as a shelf.....
dalte wakt we see that every lower layer is filled before proceeding to the next level....
par nikalte wakt we just come down numericallly...the ouetr layer first and so on.......