Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 284 Bytes

README.md

File metadata and controls

3 lines (2 loc) · 284 Bytes

This problem was asked by Microsoft.

Implement the singleton pattern with a twist. First, instead of storing one instance, store two instances. And in every even call of getInstance(), return the first instance and in every odd call of getInstance(), return the second instance.