I wrote a function to do this, but unfortunately, it doesn\'t work. Did I miss anything? I try to avoid using \'not in\' and set() and anything that C++ doesn\'t have. But t