You need to sort elements of an array where the array can be of following data-types:
Your task is to complete the given two functions: sortArray() and printArray()
The input line contains T, denoting the number of testcases. Each testcase contains 2 lines. The first line contains n(size of array) and q(type of array) separated by space. Below is the description about q.
The second line contains n elements of the array separated by space.
For each testcase in new line, print the elements in sorted form of given type of array separated by space.
1 <= T <= 50
1 <= n <= 100
1 <= q <= 3
34.23 -4.35 3.4
123 -2311 837 0
focus on challenges in implementing
-4.35 3.4 34.23
-2311 0 123 837
challenges focus implementing in on
Testcase 1: The array is of floating type. After sorting the elements of array are as such: -4.35 3.4 34.23
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.