/* Testing Functions */ bool LinkedListsExpert::testMe(){ bool checker = true; checker &= testDeleteDuplicates(); checker &= testGetNthToLast(); checker &= testPartition(); return checker; }
// ------------------------------------------------------------------------ // Simple driver function to test union-find partition algorithm int main( void ) { printf( "Union-find test program\n" "Universe: [0, ..., %i]\n" "Commands: u x y - unions together blocks containing x and y\n" " f x - finds block containing x\n" " p - print partition\n" " . - quit\n", SIZE-1 ); Part pt = newPart( SIZE ); testPartition( pt ); freePart( pt ); printf( "Goodbye!\n" ); }
int main(int argc, const char * argv[]) { testPartition(); testQuickSort(); return 0; }