Infer Generic Return Types | OpenAI Interview Question