Question: You have to write functions for the following tasks: a. Write a function to generate n random numbers in between a range of 100 to
You have to write functions for the following tasks:
a. Write a function to generate ānā random numbers in between a range of 100 to 200 in an array.
int[] GenerateRandom(int n)
b. Write a function to sort an array using Bubble sort algorithm and returns the sorted array.
int[] BubbleSort(int[] array)
c. Write a function to sort an array using Insertion sort algorithm and returns the sorted array.
int[] InsertionSrot(int[] array)
d. Write a function to sort an array using Selection sort algorithm and returns the sorted array.
int[] SelectionSort(int[] array)
Step by Step Solution
3.42 Rating (146 Votes )
There are 3 Steps involved in it
a import random def GenerateRandomn for i in rangen printrandomrandint100200 ni... View full answer
Get step-by-step solutions from verified subject matter experts
