Pergunta de entrevista da empresa Morgan Stanley

What is Singlton and Factory pattern?