Given list sorting array and same frequency
Input:
[2 6 3 1 8 12 2 9 10 3 4]
Output:
[1 2 2 3 3 4 6 8 9 10 12]
2 3
A = [2, 6, 3, 1, 8, 12, 2, 9, 10, 3, 4]
B = list(set(A))
x = []
for r in range(0,len(B)):
for c in range(0,A.count(B[r])):
x.append(B[r])
print(x)
Comments
Leave a comment