What are the heterocyclic compounds in nucleic acids?

The heterocyclic compounds in nucleic acids are of two types - purines and pyrimidines. Purines are adenine and guanine and pyrimidines are thymine, cytosin and uracil.