Created
July 21, 2020 08:33
-
-
Save kjk/c94be97aad4c09a6a6103f866ff8ec93 to your computer and use it in GitHub Desktop.
Example for sort (made with https://codeeval.dev)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> // std::sort | |
#include <iostream> | |
#include <vector> // std::vector | |
using namespace std; | |
int main() | |
{ | |
vector<int> a{3, 8, 1, 5, -8, 33, 4}; | |
sort( a.begin(), a.end() ); | |
int const n = a.size(); | |
for( int i = 0; i < n; ++i ) { cout << a[i] << ' '; } | |
cout << '\n'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment