Please help with this error

https://ide.geeksforgeeks.org/bHwrSMSnUA

#include
is the only header file u have include

either take
#include <bits/stdc++.h>
or include header for each component u are conserding and are not included in iostream

Hey Chhavi It is showing worng output ,for this input values below showing segmentation fault:

4
5 3
1 2 3 4 5
4 3
5 6 8 9
4 7
5 6 8 9
8 3
1 2 3 4 5 6 7 8

https://ide.geeksforgeeks.org/KSOo6EfVMj

the question is to reverse the array in groups of k right?

Yup Chhavi. I implemented but It is showing SEGFAULT.
Same Is working with array but for space complex i’m implementing from vector

Great Chhavi .Thankyou so much :slight_smile: tc.

1 Like

Chhavi one last question why you have passed the address of mv vector in function arg?

vo mt bhi pass karo to i think chal jayega
vectors by refernce he pass hote h
not 100% sure but it should work without passing it with refernce

Hmm Chhavi It worked thanks yrr . Great tc

1 Like