From bb0fbc3f4908025ba47b8d45fe0ee949980bb25f Mon Sep 17 00:00:00 2001 From: niyalimukherjee <86914501+niyalimukherjee@users.noreply.github.com> Date: Sat, 2 Oct 2021 12:01:44 +0530 Subject: [PATCH 1/2] Create bubblesort.cpp --- bubblesort.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 bubblesort.cpp diff --git a/bubblesort.cpp b/bubblesort.cpp new file mode 100644 index 0000000..cc7eb35 --- /dev/null +++ b/bubblesort.cpp @@ -0,0 +1,31 @@ +//Bubble Sort code by niyalimukherjee +#include +using namespace std; +int main() +{ + int n; + cin>>n; + int arr[n]; + for(int i=0;i>arr[i]; + } + int c=1; + while(carr[i+1]) + { + int temp=arr[i]; + arr[i]=arr[i+1]; + arr[i+1]=temp; + } + } + c++; + } + for(int i=0;i Date: Sat, 2 Oct 2021 12:14:56 +0530 Subject: [PATCH 2/2] Create groovingmonkeyproblem.cpp --- groovingmonkeyproblem.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 groovingmonkeyproblem.cpp diff --git a/groovingmonkeyproblem.cpp b/groovingmonkeyproblem.cpp new file mode 100644 index 0000000..f1e11b8 --- /dev/null +++ b/groovingmonkeyproblem.cpp @@ -0,0 +1,27 @@ +//C++ implementation of groovingmonkeyproblem by niyalimukherjee +#include"bits/stdc++.h" +using namespace std; +int main() +{ + int t,N; + cin>>t; + cin>>N; + int monkeys[N]; + for(int i=0;i>monkeys[i]; + } + int b[N]; + int c=0; + + for(int i=0;i