If you Google search the space complextiy of KNN, virtually all answers are saying that it costs $O(dN)$, where $d$ is the dimension of our data and $N$ is the number of our data.
But why?
I understand that we need to store $d \times N$ numbers, so that's where the $dN$ comes in.
But aren't we storing a lot more, for example, the $k$ $d$-dimensional nearest neighbors?
So the space complexity should be $O(dN + dk)$.
Is this correct? Are there any other "spaces" I am missing?