Citi interview question

What is factory pattern? What is singleton?