longest consecutive sequence, by hashmap