Skip to content

Instantly share code, notes, and snippets.

@kjk
Created July 21, 2020 08:33
Show Gist options
  • Save kjk/c94be97aad4c09a6a6103f866ff8ec93 to your computer and use it in GitHub Desktop.
Save kjk/c94be97aad4c09a6a6103f866ff8ec93 to your computer and use it in GitHub Desktop.
Example for sort (made with https://codeeval.dev)
#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