LogiQuest
Back to Sorting
18

What is the output of the following code?

a = [64, 25, 12, 22, 11]
for i in range(len(a)):
    j = a.index(min(a[i:]), i)
    a[i], a[j] = a[j], a[i]
    if i == 1:
        break
print(a)
Hard

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.