I hereby claim:
- I am giannigdev on github.
- I am giannigdev (https://keybase.io/giannigdev) on keybase.
- I have a public key whose fingerprint is 5B2F 47E1 41E7 509C B501 1CBF 3EBA 7C62 6244 FE7C
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| //Begin test Bubble Sorting Code | |
| NSArray *dArray =@[@101, @201, @301,@121,@11,@123,@21,@14,@32,@76,@89,@987,@65]; | |
| NSMutableArray *dataArray = [NSMutableArray arrayWithArray:dArray]; | |
| //Check Bubble Sort | |
| NSArray *bubbleSortedArray = [self bubbleSort:dataArray]; | |
| NSLog(@"bubbleSortCount %d",bubbleSortCount); //Number of Iterations //bubbleSortCount is a static variable initialized to 0 //Gives the average & worst case of n^2 | |
| NSLog(@"bubbleSortedArray %@",bubbleSortedArray); //Prints the sorted array | |
| bubbleSortCount =0; //Reinitialize the static variable to 0 to retest | |
| NSLog(@"bubbleSortedArray %@",[self bubbleSort:bubbleSortedArray]); //Resort the already sorted array |