Base and Indices equal?

When we returned base, how did its value go into indices?
Was it because it was null?

No, its not because its value was null. its because the way allIndices() function was called.
Just read a little bit about head recursion.
see this line
indices = allIndices(…), …(1)
when allIndices() is called last time(base condition is true), it will return base array and that will be received by indices array due to call …(1)

Thanks.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.