Question: Need help creating a function in Python that does the following: def complicated_sort(the_list: List[float]) -> List[float]: Sorts a list of floats by non-decreasing order

Need help creating a function in Python that does the following:

def complicated_sort(the_list: List[float]) -> List[float]:

""" Sorts a list of floats by non-decreasing order of integer parts, and as a tie-breaker,

by non-increasing order of their fractional part.

:raises TypeError: if the list is None.

:complexity: Best O(N) if the sublist is already sorted, worst O(N^2),

where N is the length of sublist.

"""

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!