I am getting segmentation Fault.What can i do to remove this segmentation fault from my code.
Hostel Accomodation Implementation
In the main(), your loop should run V-1 times. Not V times.
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved
if you have more doubts regarding this feel free to ask
1 Like
But still it is not running for multiple case …it is outputing only one element
Modify my code …as i am trying to submit the ans on spoj…it is giving wrong ans
it is running for multiple testcase also
to submit it on spoj have you check sample output??
after printing according to question it got AC
code
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved
if you have more doubts regarding this feel free to ask