Pergunta de entrevista da empresa Elite Mindz

What is factory pattern and singleton pattern?