Question: Topic: Data Structure and Algorithm using C language. Q 9 ) Design a code that takes an array of integers as input and outputs the

Topic: Data Structure and Algorithm using C language.
Q9) Design a code that takes an array of integers as input and outputs the sorted array using either
Merge Sort, Insertion Sort, or Bubble Sort, depending on the size and characteristics of the input
array.
As it is known that for the small-mid-large datasets the bubble-insertion-merge sorting technique
(respectively) is considered to be good.
For this particular exercise: 10 numbers in the dataset will be termed as small dataset, 15 for mid
and remaining for large. (These threshold values can be changed.)
Code takes "size" and elements of array as input. It should choose appropriate sorting algo based on
the numbers in the dataset and print which algo is used. (Follow the template to avoid any error.)
Sorting Algorithm Index:
1: Bubble Sort
2: Insertion Sort
3: Merge Sort
Input:
Number of elements in the array
Elements of the Array
Output:
First print the index of the sorting algorithm which is used for sorting.
Output the sorted array
 Topic: Data Structure and Algorithm using C language. Q9) Design a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!