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
1 ответ
+ 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