102k views
2 votes
Given an array, arr(0, 2,3,5, 4], and an integer x = 1, sort the array using the method below.

User Cerebrou
by
8.0k points

1 Answer

1 vote

Answer:

Step-by-step explanation:

arr = [0, 2, 3, 5, 4]

x = 1

arr.append(x)

sorted_arr = sorted(arr)

print(sorted_arr)

User Kevinadi
by
7.9k points