def test_algorithm(seed, numTrials=1000, numVals=100, maxVal=10000, verbose=True):
    numVals = int(numVals)
    maxVal = int(maxVal)
    if verbose:
        print('\n')
        print('   --   Prune and Search Algorithm   --   ')
        print('     ================================     ')
        print('     Random Numbers Seed       =  {} '.format(seed))
        print('     Number of Trials          =  {} '.format(numTrials))
        print('     Number of Values in List  =  {} '.format(numVals))
        print('     Maximum Value in List     =  {} '.format(maxVal))
        print('\n')
    np.random.seed(seed)
    SortAndSearchAnsBuffer = []
    SortAndSearchTimeBuffer = []
    print('Beginning {} Trial on {} elements for Sort And Search   . . .  '.format(numTrials, numVals), end='', flush=True)
    for _ in range(numTrials):
        randomList = np.random.randint(maxVal, size=numVals)
        findVal = np.random.randint(1, (numVals + 1))
        startTime = time.time()
        ansVal = algs.SortAndSearch(randomList, findVal)
        endTime = time.time()
        SortAndSearchAnsBuffer.append(ansVal)
        SortAndSearchTimeBuffer.append((endTime - startTime))
    print('Δ : {:.4f},  μ : {:.6f} ± {:.6f} '.format(np.sum(SortAndSearchTimeBuffer), np.mean(SortAndSearchTimeBuffer), np.std(SortAndSearchTimeBuffer)))
    np.random.seed(seed)
    PruneAndSearchAnsBuffer = []
    PruneAndSearchTimeBuffer = []
    print('Beginning {} Trial on {} elements for Prune And Search  . . .  '.format(numTrials, numVals), end='', flush=True)
    for _ in range(numTrials):
        randomList = np.random.randint(maxVal, size=numVals)
        findVal = np.random.randint(1, (numVals + 1))
        startTime = time.time()
        ansVal = algs.PruneAndSearch(randomList, findVal)
        endTime = time.time()
        PruneAndSearchAnsBuffer.append(ansVal)
        PruneAndSearchTimeBuffer.append((endTime - startTime))
    print('Δ : {:.4f},  μ : {:.6f} ± {:.6f} '.format(np.sum(PruneAndSearchTimeBuffer), np.mean(PruneAndSearchTimeBuffer), np.std(PruneAndSearchTimeBuffer)))
    print('\nDid the Algorithms find the same solutions? ==> {}\n'.format((PruneAndSearchAnsBuffer == SortAndSearchAnsBuffer)))
    return
def test_algorithm(seed, numTrials=1000, numVals=100, maxVal=10000, verbose=True):
    numVals = int(numVals)
    maxVal = int(maxVal)
    if verbose:
        print('\n')
        print('   --   Prune and Search Algorithm   --   ')
        print('     ================================     ')
        print('     Random Numbers Seed       =  {} '.format(seed))
        print('     Number of Trials          =  {} '.format(numTrials))
        print('     Number of Values in List  =  {} '.format(numVals))
        print('     Maximum Value in List     =  {} '.format(maxVal))
        print('\n')
    np.random.seed(seed)
    SortAndSearchAnsBuffer = []
    SortAndSearchTimeBuffer = []
    print('Beginning {} Trial on {} elements for Sort And Search   . . .  '.format(numTrials, numVals), end=, flush=True)
    for _ in range(numTrials):
        randomList = np.random.randint(maxVal, size=numVals)
        findVal = np.random.randint(1, (numVals + 1))
        startTime = time.time()
        ansVal = algs.SortAndSearch(randomList, findVal)
        endTime = time.time()
        SortAndSearchAnsBuffer.append(ansVal)
        SortAndSearchTimeBuffer.append((endTime - startTime))
    print('Δ : {:.4f},  μ : {:.6f} ± {:.6f} '.format(np.sum(SortAndSearchTimeBuffer), np.mean(SortAndSearchTimeBuffer), np.std(SortAndSearchTimeBuffer)))
    np.random.seed(seed)
    PruneAndSearchAnsBuffer = []
    PruneAndSearchTimeBuffer = []
    print('Beginning {} Trial on {} elements for Prune And Search  . . .  '.format(numTrials, numVals), end=, flush=True)
    for _ in range(numTrials):
        randomList = np.random.randint(maxVal, size=numVals)
        findVal = np.random.randint(1, (numVals + 1))
        startTime = time.time()
        ansVal = algs.PruneAndSearch(randomList, findVal)
        endTime = time.time()
        PruneAndSearchAnsBuffer.append(ansVal)
        PruneAndSearchTimeBuffer.append((endTime - startTime))
    print('Δ : {:.4f},  μ : {:.6f} ± {:.6f} '.format(np.sum(PruneAndSearchTimeBuffer), np.mean(PruneAndSearchTimeBuffer), np.std(PruneAndSearchTimeBuffer)))
    print('\nDid the Algorithms find the same solutions? ==> {}\n'.format((PruneAndSearchAnsBuffer == SortAndSearchAnsBuffer)))
    return