Here is the code and problem i am getting segmentation fault pls help
input and output would be from driven system
here is only the logic
runtime error is coming
now it passed the test cases
thankss
it is working fine, make sure u copied the code correctly
yeah sir it passed
please explain me the line number 43 of your code
first we need to valid thhe index , if it is valid then only we can access the index.
thats the reason i put check first