Question: Create a Method of sorting method (Bubble Sort, Selection sort, Merge sort) and a method of searching method (Linear Search, Binary Search, Jump Search).

Create a Method of sorting method (Bubble Sort, Selection sort, Merge sort) and a method of searching method (Linear Search, Binary Search, Jump Search). Write a method for each algorithm that sorts or searches a given array of integers. The methods must take one parameter which is the list. For the searching method one additional parameter "search_value" must be passed because for searching you first need a value to search for. Please check the following code snippet for clarity: def sort_method (list_name, algorithm_name): if algorithm_name == 'X': Sorted list = sortingAlgorithmA (list_name) elif algorithm_name == 'Y': Sorted_list = sortingAlgorithmB (list_name) else: Sorted_list = sortingAlgorithmC (list_name): def search method (list_name, algorithm_name, search_value): if algorithm_name =='X': Search Result = searchingAlgorithmA (list_name, search_value) elif algorithm_name == 'Y': Search Result = searchingAlgorithmB (list_name, search_value) Search Result = searchingAlgorithmC (list_name, search_value): else:
Step by Step Solution
3.55 Rating (148 Votes )
There are 3 Steps involved in it
Pytho... View full answer
Get step-by-step solutions from verified subject matter experts
