In the hint of marbles question, there is a concept star and bars method.
There is another approach that came into my mind before watching the hint.
firstly, we take k marbles, (as 1 marble per category)
Now, If we take k categories as spaces. And we are left with
(n-k) marbles.
Then, we can say that, each of (n-k) marbles will have k options.
So, according to the above method, we have (n-k)^(k) ways/options.
But according to the above logic, my answer is getting wrong.
Plz tell me, where my approach is wrong.