Need to clarify duplicate numbers not included in consecutive seq?


  • 0

    Is it better to need to clarify duplicate numbers not included in consecutive seq?

    For example, if input [0, 0] should output 1, instead of 2, since no duplication counted in result.

    If duplicate number considered, we need use HashMap instead of HashSet, and a little different in coding.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.