From 1d419648402d2f60efa3300f449808f40ce98fea Mon Sep 17 00:00:00 2001 From: kamyu Date: Thu, 12 May 2016 23:50:37 +0800 Subject: [PATCH] Update contains-duplicate-iii.cpp --- C++/contains-duplicate-iii.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C++/contains-duplicate-iii.cpp b/C++/contains-duplicate-iii.cpp index 0231eb157..a8e790d61 100644 --- a/C++/contains-duplicate-iii.cpp +++ b/C++/contains-duplicate-iii.cpp @@ -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.