Find next greater element for subset | Pinduoduo Interview Question