Giter Site home page Giter Site logo

abhinav092003 / daa- Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dharmanshu9930/daa-

0.0 0.0 1.0 1.48 MB

Hacktoberfest repo

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

C++ 62.55% Python 1.69% Perl 1.10% C 3.15% PHP 1.36% Java 19.11% Scala 0.08% Tcl 0.02% CSS 0.31% HTML 10.41% Roff 0.20%

daa-'s Introduction

//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; }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.