kirsh890 / Daa-

Hacktoberfest repo

Home Page:https://github.com/dharmanshu9930/Daa-

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hacktoberfest-2022

you can get here c and cpp program's

//merge sort #include

using namespace std;

void merge(int a[],int b[],int x,int y,int c[]) { int z=0,i=0,j=0,k=0; while(i<x && j<y) { if(a[i]<b[j]) c[k++]=a[i++]; else c[k++]=b[j++]; } while(i<x) c[k++]=a[i++]; while(j<y) c[k++]=b[j++]; } int main() { int a[100],b[100],c[100],x,y; cout<<"Enter the sizes of the arrays"; cin>>x>>y; cout<<"ENter array 1:"; for(int i=0;i<x;i++) cin>>a[i]; cout<<"Enter Array 2:"; for(int i=0;i<y;i++) cin>>b[i]; merge(a,b,x,y,c); for(int i=0;i<x+y;i++) cout<<c[i]<<" "; return 0; }

About

Hacktoberfest repo

https://github.com/dharmanshu9930/Daa-


Languages

Language:C++ 62.7%Language:Java 18.9%Language:HTML 10.0%Language:C 3.9%Language:Python 1.6%Language:PHP 1.3%Language:Perl 1.1%Language:CSS 0.3%Language:Roff 0.2%Language:Scala 0.1%Language:Tcl 0.0%