Amazon interview question

Implement a request IP class