I know this is a data structure class, but it is a class in C++ and memory management in a big deal there, especially in an interview. All lessons should be revised to properly delete allocated memory!
Type your question above this line.
Course: https://www.educative.io/collection/5642554087309312/5646276079124480
Lesson: https://www.educative.io/collection/page/5642554087309312/5646276079124480/5687663524839424