i am getting segmentation fault in this code but my code is taking up only o(n) complexity? i am not able to find the error
Arrays-sum of two numbers as represented as arrays
@anishmittal you are going to index k for array c, now k, this will result in wrong answer.
Now you are not checking if index of any array is becoming negative or not, this will cause Segmentation fault.
Refer to this code for implementation.
If this resolves your doubt mark it as resolved.
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.