Quicksort algorithm

quicksort :-

in C++ -> https://ide.codingblocks.com/s/582208

in Java -> https://ide.codingblocks.com/s/582211

why it gives error in java for same input array despite the code being exactly same ??

hey @prerak_semwal your c++ code is right, not sure about java code.
might be some issue with inheritance.

@mr.encoder
inheritance ?? I mean in what context ??

I am not sure about java code, i have asked java ta to reply on it. He will respond soon.

I looked at your Java code, and made a slight improvement in the code. During the partitioning, we need to keep a check on the starting point that it doesn’t exceeds the end point or else we can receive an error. So we need to add the constraint of s<=e.
You can refer to this: