Talk:TADM2E 1.9

From Algorithm Wiki
Revision as of 03:29, 15 April 2017 by Zhangyuhangk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

What if the code in the inner loop is wrong?

function bubblesort (A : list[1…n])

     var int i,j
     for i from n to 1
         for j from 1 to i−1
             blablabla... (wrong code)

No matter what "blablabla" is, it looks like we can still prove the algorithm's correctness by the same approach...