Question: how many electrons are in the outer (valence) shell of nitrogen (n)?
Answer: Nitrogen has a total of 5 valence electrons, so doubling that, we would have a total of 10 valence electrons with two nitrogen atoms. The octet requires an atom to have 8 total electrons in order to have a full valence shell, therefore it needs to have a triple bond.