Object-Oriented Programming · Stripe · Easy
Build a routing service for data centers. It receives a stream of operations that register data centers, change their health, and ask where a request should be routed. Every data center is described by a unique id, the region it belongs to, its position given as latitude and longitude in degrees, and whether it is currently healthy. Handle the operations one after another, in the order given: REGISTER id region latitude longitude: add a data center. When a data center with…