Data should be in ascending order.