Problem 220: Contains Duplicate III
思路
易错点
数据溢出,用 long 存储
Long 是类,对应 Integer;
long 是数据类型,对应 int
SortedSet 类用 TreeSet 实现
subSet 方法左闭右开
所以 rightBound 要加 1
Last updated
数据溢出,用 long 存储
Long 是类,对应 Integer;
long 是数据类型,对应 int
SortedSet 类用 TreeSet 实现
subSet 方法左闭右开
所以 rightBound 要加 1
Last updated