Citi Interview Question

What is factory pattern? What is singleton?