add time complexity comment