Easy Learning Data Structures & Algorithms C++: Graphic Data Structures & Algorithms by Hu Yang

Easy Learning Data Structures & Algorithms C++: Graphic Data Structures & Algorithms by Hu Yang

Author:Hu, Yang [Hu, Yang]
Language: eng
Format: epub
Published: 2019-09-26T16:00:00+00:00


TestMergeSort.cpp

#include <iostream>

#include <string>

using namespace std;

void sort( int array[], int length) ;

void mergeSort( int array[], int temp[], int left, int right) ;

void merge( int array[], int temp[], int left, int right, int rightEndIndex) ;

int main()

{

int scores[] = { 50 , 65 , 99 , 87 , 74 , 63 , 76 , 100 , 92 };

int length = sizeof ( scores) / sizeof ( scores[ 0 ]);

sort( scores, length);

for ( int i = 0 ; i < length; i++)

{

cout << scores[ i] << "," ;

}

return 0 ;



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.