write function called list_median that takes a list and returns a new list. If the list has
Fantastic news! We've Found the answer you've been seeking!
Question:
the new list will include only one element. For example:
>>> t1 = [5, 1, 2, 3, 4]
>>> list_median(t1)
[3]
>>> t2 = [8, 3, 10, 6]
>>> list_median(t2)
[6, 8]
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Posted Date: