I'm confusing about something which I'm struggling with.
sometimes we put this condition sometimes on arrays: (assume we have pointer to array as arr)
so what I'm not understanding is, if arr ==NULL is not saying the size of array 0? I'm totally confused with those two cases , can you please attach example to those two cases? thanks alot alot .Code:if (arr == NULL || arr.length()==0 ) // Base case return -1
And in Nodes/binary tree we just say in Base case about nullity
we are not taking the case of size of the tree is zero .. so why?Code:if (root==NULL) return 0;
thanks