  The distribution of N/O abundance ratios calculated by the detailed modelling
of different galaxy spectra at z<4 is investigated. Supernova (SN) and long
gamma-ray-burst (LGRB) host galaxies cover different redshift domains. N/O in
SN hosts increases due to secondary N production towards low z (0.01)
accompanying the growing trend of active galaxies (AGN, LINER). N/O in LGRB
hosts decreases rapidly between z>1 and z ~0.1 following the N/H trend and
reach the characteristic N/O ratios calculated for the HII regions in local and
nearby galaxies. The few short period GRB (SGRB) hosts included in the galaxy
sample show N/H <0.04 solar and O/H solar. They seem to continue the low bound
N/H trend of SN hosts at z<0.3. The distribution of N/O as function of
metallicity for SN and LGRB hosts is compared with star chemical evolution
models. The results show that several LGRB hosts can be explained by star
multi-bursting models when 12+log(O/H) <8.5, while some objects follow the
trend of continuous star formation models. N/O in SN hosts at log(O/H)+12 <8.5
are not well explained by stellar chemical evolution models calculated for
starburst galaxies. At 12+log(O/H) >8.5 many different objects are nested close
to O/H solar with N/O ranging between the maximum corresponding to starburst
galaxies and AGN and the minimum corresponding to HII regions and SGRB.
