You have to write functions for the following tasks: a. Write a function to generate n random
Fantastic news! We've Found the answer you've been seeking!
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 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)
Related Book For
Modeling the Dynamics of Life Calculus and Probability for Life Scientists
ISBN: 978-0840064189
3rd edition
Authors: Frederick R. Adler
Posted Date: