Morgan Stanley interview question

What is Singlton and Factory pattern?