Baidu Interview Question

Design patterns, singleton, factory?