Consider an array in which the elements are in range from 1 to n², for example : A= [170, 450, 705, 920, 802, 247, 200,
Posted: Fri Jul 08, 2022 7:26 am
Consider an array in which the elements are in range from 1 to n², for example : A= [170, 450, 705, 920, 802, 247, 200, 616] For such an input: 1) write a sorting algorithm that can sort this array in linear time. 2) Discuss its complexity 3)Clearly show how such an algorithm will process the above input at each step. Note: you must select algorithm from comparison and non-comparison based sorting algorithms discussed in class.