HighRadius Interview Question

What is singleton and factory pattern