Skip to content

Commit 213fb69

Browse files
authored
Update contains-duplicate-iii.cpp
1 parent 97b4132 commit 213fb69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/contains-duplicate-iii.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Solution {
1818
bst.erase(bst.find(num));
1919
}
2020
// Every search costs time: O(logk).
21-
const auto it = bst.lower_bound(nums[i] - t);
21+
const auto it = bst.lower_bound(static_cast<int64_t>(nums[i]) - t);
2222
if (it == bst.cend() || (*it - nums[i]) > t) {
2323
// Not found.
2424
window.emplace(nums[i]);

0 commit comments

Comments
 (0)