QuickSort problem

Can you chech whats wrong with ym code

Hey @rahul.gupta03111999 what issue you are getting in this question?

I am getting a segmentation fault

Okay I’ll soon debug your code, till then be patient :slight_smile:

Hey friend, you have made two functions work in a single function. Make 2 separate function. One which divides array and one which operates the divided array or else you will again get segmentation fault. Hope this would help :slight_smile:

It is still not working

Hey Rahul I have debugged your code and can see that your partition function implementation is good but the position you have allotted to your variables are wrong. See this is my personal code https://ide.codingblocks.com/s/131008
Take reference from this , it might help you. Just take reference for partition function only as cause rest your function is absolutely correct :slight_smile:

Sir I corrected my code. There was just one mistake in the inner while loop

Good I am happy that my code helped you :slight_smile:

1 Like

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.