Private estimation algorithms for stochastic block models and mixture models