From 7b51be51d3b0024a1992d861082655f231cbbb8e Mon Sep 17 00:00:00 2001 From: tanvi355 <56465105+tanvi355@users.noreply.github.com> Date: Fri, 16 Oct 2020 22:46:09 +0530 Subject: [PATCH] Create Vector sort --- Hackerrank/Vector sort | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Hackerrank/Vector sort diff --git a/Hackerrank/Vector sort b/Hackerrank/Vector sort new file mode 100644 index 0000000..9794c9b --- /dev/null +++ b/Hackerrank/Vector sort @@ -0,0 +1,27 @@ +// problem link : https://www.hackerrank.com/challenges/vector-sort/problem + +#include +#include +#include +#include +#include +using namespace std; + + +int main() { + /* Enter your code here. Read input from STDIN. Print output to STDOUT */ + int N; cin>>N; + int x; + vectorv; + + for(int i=0;i>x; + v.push_back(x); + } + sort(v.begin(),v.end()); + + for(int i=0;i