can you write singleton which will work for 4-5 scenarios not for all?
Asked in the F2F stage. Implement a testable singleton registry for up to five class names. Each distinct class name must receive one instance identity, while repeated requests for that class must reuse its original identity. Constructor values supplied after the first request are ignored.
requests is a list of [class_name, constructor_value] pairs. Return a list of integer instance identities in request order. Assign identities from 0 in order of first appearance.
def singleton_instance_ids(requests):