Chinsay interview question

Basic algorithmic code questions, Architect patterns.