Blazing IASian
f(x) = |x - 1| + |x - 2|
= 2x - 3 , x > 2
1 , 1 < x < 2
- 2x + 3 , x < 1
Clearly, range of f(x) is [1,5].