Skip to content

Commit

Permalink
Update contains-duplicate-iii.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyu104 committed May 12, 2016
1 parent 6d38b46 commit 1d41964
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion C++/contains-duplicate-iii.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Solution {
window.pop();
bst.erase(bst.find(num));
}
// Every search costs time: O(logn).
// Every search costs time: O(logk).
const auto it = bst.lower_bound(nums[i] - t);
if (it == bst.cend() || (*it - nums[i]) > t) {
// Not found.
Expand Down

0 comments on commit 1d41964

Please sign in to comment.