Write a method named partition that accepts a List of CalendarDates

computer science

Description

A. Write a method named partition that accepts a List of Calendar Dates and a Calendar Date value E as its two parameters, and rearranges (partitions) the list so that all its elements less than E occur before all elements greater than E. The exact order of the elements is unimportant so long as all elements less than E appear before all elements greater than or equal to E. For example, for the list [1/6, 1/2, 3/9, 4/1], one acceptable ordering of the list after the call of partition(list, 1/5) would be [1/2, 3/9, 4/1, 1/6]. B. Write a method named sortAndRemoveDuplicates that accepts a List of CalendarDates as its parameter and rearranges the list's elements into sorted ascending order, as well as removing all duplicate values from the list. For example, the list [1/7, 1/4, 1/4] would become [1/4, 1/7] after a call to your method.

Instruction Files

Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.