Elite Mindz interview question

What is factory pattern and singleton pattern?