Please tell about this vector problem

Hey @aryangrover There is an issue with the way you are declaring your vector and using it later.
Check out this https://www.quora.com/What-is-the-difference-between-vector-int-v-N-and-vector-int-v-N
for more understanding on this.
If you still have any further doubts please feel free to ask


Sir Why it is now showing an error?

Hey @aryangrover see the line 45 of your code, sort(v3.begin(),v.end()+1), because of this your code is throwing segmentation fault. You need to either make it sort(v3.begin(),v3.end()) or sort(v.begin(),v.end()) as per your logic.

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.