OneAdvanced interview question

Program to remove duplicates from an array and sort it in ascending order

Interview Answer

Anonymous

24 Jan 2021

Solved in Python, Stored the elements in List and converted it to set and coverted it back to list.(Set is ordered and it don't store duplicate elements) List 1= [10,20,40,5,40,15] Set1= set(List1) List2=List(Set1) print(List2) output: [5,10,15,20,40]

1