Here is a functionĀ stablesortbadĀ that takes a list of pairs of integers as input and sorts them by the first coordinate in each | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Here is a functionĀ stablesortbadĀ that takes a list of pairs of integers as input and sorts them by the first coordinate in each

Provide an input for whichĀ stablesortbadĀ produces an output that is not stably sorted. Your input should be a list of pairs of integers of the form [(i1,j1),(i2,j2),...,(in,jn)]. def stablesortbad(l): for j in range(len(l)-1): for i in range(len(l)-1): if l[i][0] >= l[i+1][0]: (l[i],l[i+1]) = (l[i+1],l[i]) return(l) Open up the code submission box below and write your test case where you would normally paste your code, below the lineĀ myinput = '''. Your input should be a list of pairs of integers of the

17th Sep 2017, 11:15 AM
high_functioning_sociopath
high_functioning_sociopath - avatar
1 Resposta
+ 1
if u are interested in learning Python check out this dude "The Xcode" he just started learning Python toturiles on YouTube . yesterday was his first vid the link to his channel : https://m.youtube.com/channel/UCsinMWgI7pXJQGc0gwMXimg
17th Sep 2017, 2:04 PM
jay