Infosys interview question

There are two lists, join them and sort them without using built in functions

Interview Answer

Anonymous

3 Sept 2023

lis = [2,5,11,3,4] lis2 = [1,2,5,7,0] lis.extend(lis2) for i in range(len(lis)): for j in range(i, len(lis)): if lis[i] > lis[j]: temp = lis[j] lis[j] = lis[i] lis[i] = temp