To an extent, yes. In this particular case, no.
I don't see a problem with allowing questions that have Stack Overflow Exceptions, provided the code works acceptably on a smaller input set. If we were to eliminate questions with SOE, then by all rights we should eliminate time-limit-exceeded questions as well, simply because they "don't work as expected" for the very specific large input they are failing on.
A Stack Overflow Exception is just another variant of time-limit-exceeded. Except, instead of the time being exceeded, the actual amount of information on the stack has been exceeded. The only difference is the manner in which the error with the code is presented.
SOE questions can also help us all out: now we have a chance to point out potential optimizations that can lead to tail-call recursion which wouldn't overflow the stack, or reduce the memory footprint to reduce stack space, et. al. It gives all users a chance to learn how to prevent their own Stack Overflow Exceptions.
The reason I would say "no" to this question, is that the OP doesn't want a code review, but instead wants:
In some test cases it is giving StackOverflow Error. Could I please help me correct this code?
Were the question rephrased, it would be a fine fit. Were the OP to be looking for a general code review with the possibility that it would fix the SOE, then it would be fine. As it stands, the OP specifically wants a fix to the SOE.
If the code works for small inputs, then we can assume it would work for large inputs, were the SOE not present.