How to make constructors/destructors in C structures?.. I want to clear the globa

How to make constructors/destructors in C structures?.. I want to clear the global variable. My program is getting correct answer in Correctness but failing in Time Complexity with Segmentation fault.

Click here to start solving coding interview questions