✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
std::list < int > lst = {3, 1, 2, 2}; lst.sort(); lst.unique(); lst[1] = 5; lst.push_back(9); for (int x : lst) std::cout << x << " ";