Infosys interview question

Please write down algorithm for bubble sort?

Interview Answer

Anonymous

28 July 2016

Loop i from 1 to N Loop J from i+1 to N if(array[i]>array[j) Swap(array[i],array[j]) else continue end loop end loop