Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
You need to sort elements of an array where the array can be of following data-types: Integer, String, floating number. Your task is to complete the given two functions: sortArray() and printArray()
Input:
The input line contains T, denoting the number of test cases. Each test case contains 2 lines. The first line contains n(size of array) and q(type of array) separated by space. Below is the description of q.
q = 1, means elements of the array are of integer type
q = 2, means elements of the array are of string type
q = 3, means elements of array are of floating digit type
The second line contains n elements of the array separated by space.
Output:
For each testcase in new line, print the elements in sorted form of given type of array separated by space.
Constraints:
1 <= T <= 50
1 <= n <= 100
1 <= q <= 3