Advertisement
_Darya___

сортировка слияния

Dec 2nd, 2015
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1.  
  2. \#include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. void merge (int *left,int *right,int * a,int nl,int nr ) {
  7. int il=0, ir=0,i=0;
  8. while(il+ir<nl+nr){
  9. if(il==nl){
  10. a[i++]=right[i++];
  11. if(nl==il){
  12. a[i++]=left[i++];
  13. }
  14. }
  15. }
  16. }
  17.  
  18. cout << "Hello World!" << endl;
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement