Question: python3.6 Write a function removeDuplicates(l) that returns the unique values in a list of doubles. You may assume that the list is sorted, as you
python3.6
Write a function removeDuplicates(l) that returns the unique values in a list of doubles. You may assume that the list is sorted, as you did for numUnique above. You must go through the list exactly one more time. Here are some examples
[] == removeDuplicates([] )
[11] == removeDuplicates([11] )
[11] == removeDuplicates([11,11,11,11] )
[11,22,33,44,55,66,77.88] == removeDuplicates([11, 11, 11, 11, 22, 33, 44, 44, 44, 44, 44, 55, 55, 66, 77, 88, 88] )
[11,22,33,44,55,66,77.88] == removeDuplicates([11, 22, 33, 44, 44, 44, 44, 44, 55, 55, 66, 77, 88])
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
