update longest consecutive sequence