Elements with completely filled shells are going to be the most stable of all elements. Helium with 1 s^2 is the most stable of all elements. Neon with 1s^2 2^2 2p^6 has the first and second electron shells completely filled is so stable it is used for Neon lights with thousands of volts of electricity running through the Neon without fear of a chemical reaction.
Zinc 1s^2 2s^2 2p^6 3^2 3p^6 4s^2 3d^10 is one of the most stable transition metals. Steel is covered with zinc to prevent rusting. Galvanizing with zinc works because, Zinc is relatively stable because of the filled s subshell and filled d subshell.
Nitrogen with a half filled subshell of 2p^3 is more stable than either Carbon with 2p^2 or Oxygen 2p^4
To determine the stability of an element look for filled electron shells, filled sub shells and have filled subshells.