Algorithm · Anthropic · Medium
Problem: Keep Prompt Requests Affinitized to GPT Servers with a Hash Map Given k GPT servers and an ordered list of prompt requests, create routing logic that sends each request to a server. Maintain a dictionary that records the server selected for each prompt: prompt -> server. On a prompt's first occurrence, choose a server, save that association, and return that server for the request. Any later request containing that identical prompt must go to the server recorded…
Checking your access…