Intel Corporation interview question

removing elements from custom C++ list