GUVI
Back

Testcase Error

Created 3 years ago
295 Views
0 Comments
Sugan-37X0
@Sugan-37X0
Sugan-37X0
@Sugan-37X0Profile is locked. Login
a=int(input())
b=[]
for i in range(a):
	x=int(input())
	y=list(map(int,input().split()))
	y.sort()
	for j in range(len(y)):
	    b.append(y[j])
print(*b)

For many problems like this is running successfully for given sample input and gives the correct output. But while submitting, we often get an error as 1 test case failed. I request the technical team to make an option for acknowledgement of error during submission also. It will be useful for us to rectify and do improve our coding skills.

Question for this one:

You are an intern at GUVI and the company wants to organise its data and delete unnecessary extra storage elements used. You are given k arrays of unequal dimensions. Sort the k arrays individually and concatenate them.
 

Input Description:
The first line contains the number of arrays. Subsequent lines contain the size of the array followed by the elements of the array.

Output Description:
An array containing the sorted elements of k sorted arrays

Sample Input :
3
2
98 12
6
1 2 3 8 5 9
1
11
Sample Output :
12 98 1 2 3 5 8 9 11
Comments
Please login to comment.
 
Powered by habitate.io Habitate