↓ 1 callersFunctioncalculate_current_element >>> triangle = [[1], [1, 1]] >>> current_row = [1, -1, 1] >>> calculate_current_element(triangle, current_row, 2, 1) >>> current_row
matrix/pascal_triangle.py:93
↓ 1 callersFunctioncalculate_each_score >>> calculate_each_score([[20, 23, 22], [60, 90, 50], [2012, 2015, 2011]], ... [0, 0, 1]) [[1.0, 0.0, 0.333333333333
other/scoring_algorithm.py:41
↓ 1 callersFunctioncalculate_turn_around_times
>>> calculate_turn_around_times([1, 2, 3, 4], [0, 1, 3])
[1, 3, 6]
>>> calculate_turn_around_times([10, 3, 7], [10, 6, 11])
[20,
scheduling/round_robin.py:44
↓ 1 callersFunctioncalculate_turnaroundtime Calculate the turn around time of each Processes Return: list of turn around times. >>> calculate_turnaroundtime([3,3,5,1], 4, [0,3,5,0])
scheduling/shortest_job_first.py:76
↓ 1 callersFunctioncalculate_waitingtime Calculate the waiting time of each processes Return: The waiting time for each process. >>> calculate_waitingtime([0,1,2], [10, 5, 8], 3
scheduling/non_preemptive_shortest_job_first.py:13
↓ 1 callersFunctioncalculate_waitingtime Calculate the waiting time of each processes Return: List of waiting times. >>> calculate_waitingtime([1,2,3,4],[3,3,5,1],4) [0, 3, 5
scheduling/shortest_job_first.py:12
↓ 1 callersFunctioncatalan_numbers Return a list of the Catalan number sequence from 0 through `upper_limit`. >>> catalan_numbers(5) [1, 1, 2, 5, 14, 42] >>> catalan_n
dynamic_programming/catalan_numbers.py:30
↓ 1 callersFunctioncircle_sort_util >>> arr = [5,4,3,2,1] >>> circle_sort_util(lst, 0, 2) True >>> arr [3, 4, 5, 2, 1]
sorts/circle_sort.py:33
↓ 1 callersFunctioncity_select Choose the next city for ants >>> city_select(pheromone=[[1.0, 1.0], [1.0, 1.0]], current_city={0: [0, 0]}, ... unvisited_cit
graphs/ant_colony_optimization_algorithms.py:168
↓ 1 callersMethodclassify Classify a given point using the kNN algorithm >>> train_X = np.array( ... [[0, 0], [1, 0], [0, 1], [0.5, 0.5], [3, 3], [
machine_learning/k_nearest_neighbours.py:47
↓ 1 callersFunctionclosest_pair_of_points >>> closest_pair_of_points([(2, 3), (12, 30)], len([(2, 3), (12, 30)])) 28.792360097775937
divide_and_conquer/closest_pair_of_points.py:125
↓ 1 callersFunctioncombination_lists Generates all possible combinations of k numbers out of 1 ... n using itertools. >>> combination_lists(n=4, k=2) [[1, 2], [1, 3], [1, 4]
backtracking/all_combinations.py:13
↓ 1 callersFunctioncombination_sum >>> combination_sum([2, 3, 5], 8) [[2, 2, 2, 2], [2, 3, 3], [3, 5]] >>> combination_sum([2, 3, 6, 7], 7) [[2, 2, 3], [7]] >>> com
backtracking/combination_sum.py:41