diff --git a/distinct.cpp b/distinct.cpp new file mode 100644 index 0000000..4a010a5 --- /dev/null +++ b/distinct.cpp @@ -0,0 +1,30 @@ +#include +using namespace std; + +void printDistinct(int arr[], int n) +{ + // Pick all elements one by one + for (int i=0; i