From 81f83c7bf62285c7e9b76c778a3a9f7ca5d7dfae Mon Sep 17 00:00:00 2001 From: Govind Sangal <115642308+sangalgovind@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:27:42 +0530 Subject: [PATCH] distinct.cpp --- distinct.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 distinct.cpp 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