Morgan Stanley Interview Question

What is Singlton and Factory pattern?