Following up on your insight, there was a problem of reevaluation when going "up" or "down" to find the lower/upper bound of temperatures. Simply adding a '-1' and '+1' appropriately takes care of that. This will avoid re-evaluation of the same temperature twice.
Following up on your insight, there was a problem of reevaluation when going "up" or "down" to find the lower/upper bound of temperatures. Simply adding a '-1' and '+1' appropriately takes care of that. This will avoid re-evaluation of the same temperature twice.