educative.io

Brute force time complexity

“Since we iterate over the entire list of k elements, n times in the worst case, therefore, the time complexity is O(n^2)”

what is meant by the ‘entire list of k elements’?
There isn’t a ‘k’ amount of elements in our input, just n.

the time complexity is obvious, but I want to be able to explain everything I do and make sure i’m not missing something in terms of verbal thinking.

yep, to be fair it looks like a typo of some sort, I can’t as well understand, what is meant here?
k - is a “sum” number, “Since we iterate over the entire list of k elements” doesn’t make any sense for me.


Course: https://www.educative.io/courses/data-structures-in-python
Lesson: Educative: Interactive Courses for Software Developers