Therefore, the time complexity of this solution is O(log(n−k))
Is it O(log(n-k) + k)? The solution needs to create and return a list of k elements.
Course: https://www.educative.io/courses/grokking-coding-interview-patterns-python
Lesson: Solution: Find K Closest Elements - Grokking Coding Interview Patterns in Python