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

1 Expert Approved Answer
Step: 1 Unlock

a import random def GenerateRandomn for i in rangen printrandomrandint100200 ni... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!