int get_max(LIST &list) { int max = 0; LIST::iterator it; for(it = list.begin(); it != list.end(); it++) { if(max<*it) { max = *it; } } return max; }
LIST my_unique(const LIST& list) { LIST new_list; for (auto it = list.begin() ; it != list.end() ; ++it) { auto exists = std::find(new_list.begin(), new_list.end(), *it); if (exists == new_list.end()) new_list.push_back(*it); } return new_list; }