In the other two posts regarding this topic:
The reason for the The Complexity being O (N * K) has not been answered correctly or explained clearly.
Please provide a proper reasoning for the Time Complexity.
Type your question above this line.
Course: https://www.educative.io/collection/5668639101419520/5671464854355968
Lesson: https://www.educative.io/collection/page/5668639101419520/5671464854355968/6658855733821440