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
Get step-by-step solutions from verified subject matter experts
