To address this issue, you might consider utilizing an algorithm such as quicksort, which is favored for its efficiency. A possible implementation in Python could be: def quick_sort ( lst ) : if len ( lst ) <= 1 : return lst else : pivot = lst [ len ( lst ) // 2 ] left = [ x for x in lst if x < pivot ] middle = [ x for x in lst if x == pivot ] right = [ x for x in lst if x > pivot ] return quick_sort ( left ) + middle + quick_sort ( right ) numbers = [ 2 , 3 , 4 , 1 , 9 , 7 , 4 , 6 , 8 , 5 ] squares = [ num ** 2 for num in numbers ] sorted_list = quick_sort ( numbers + squares ) print ( sorted_list ) In this illustration, the quicksort function is established, and subsequently, the list of numbers is combined with the list of their squares. The resulting list is then sorted using the quicksort function.