Pregunta de entrevista de OpenX

In the phone technical screen test, after the coding programming done, I was asked what design pattern I used before. I had mentioned Singleton pattern and then the interviewer asked me to write code for the singleton pattern.