Pregunta de entrevista de HighRadius

What is singleton and factory pattern