Evaluate Piecewise Linear Function | Two Sigma Interview Question