Add time complexity comments.