Birlasoft Interview Question

what is singleton and factory design pattern