Absolutely continuous and pure point spectra of discrete operators with sparse potentials