diff --git a/C++/Sorting/bucketsort.cpp b/C++/Sorting/bucketsort.cpp new file mode 100644 index 0000000..d87d45d --- /dev/null +++ b/C++/Sorting/bucketsort.cpp @@ -0,0 +1,39 @@ +#include +#include +#include +using namespace std; + void bucketSort(double arr[], long long int n) +{ + vector b[n]; + + for (int i=0; i>n; + double arr[n]; + cout<<"Enter the elements of the array"<>arr[i]; + bucketSort(arr, n); + + cout << "Sorted array is \n"; + for (int i=0; i