Hello.
I get the below error when attempting to run the modified solution code I wrote on LeetCode
Error:
Line 1034: Char 9: runtime error: reference binding to null pointer of type ‘int’ (stl_vector.h)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/bin/…/lib/gcc/x86_64-linux-gnu/9/…/…/…/…/include/c++/9/bits/stl_vector.h:1043:9
I’m unable to locate the reason for this error.
Code Link: https://ide.codingblocks.com/s/386336