You are viewing a single comment's thread. Return to all comments →
int main() { int n; std::cin >> n; std::vector vec(n);
for (auto &i : vec) std::cin >> i; std::sort(vec.begin(), vec.end()); for (const auto &i : vec) std::cout << i << ' '; return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Vector-Sort
You are viewing a single comment's thread. Return to all comments →
int main() { int n; std::cin >> n; std::vector vec(n);
}