What are the training and prediction time complexities of brute-force KNN with N samples and D features?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: easy
Interview Round: Other
Overview: Asks for the training and per-query time complexity of brute-force k-nearest neighbors with N samples and D features. It tests whether you can count the distance and selection costs, reason about query batches and memory, and know when tree or approximate indexes help.