Design a reaction-factor prediction system | Google Interview Question