diff --git a/binary_sort.cpp b/binary_sort.cpp new file mode 100644 index 0000000..a21ea06 --- /dev/null +++ b/binary_sort.cpp @@ -0,0 +1,55 @@ +// A C++ program to demonstrate working of sort(), +// reverse() +#include +#include +#include +#include //For accumulate operation +using namespace std; + +int main() +{ + // Initializing vector with array values + int arr[] = {10, 20, 5, 23 ,42 , 15}; + int n = sizeof(arr)/sizeof(arr[0]); + vector vect(arr, arr+n); + + cout << "Vector is: "; + for (int i=0; i()); + + cout << "\nVector after sorting in Descending order is: "; + for (int i=0; i