Write a method called partition that accepts a list of integers and an integer value E as its parameter, and rearranges (partitions) the list so that all the elements with values less than E occur before all elements with values 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 E. For example, for the linked list [15, 1, 6, 12, −3, 4, 8, 21, 2, 30, −1, 9], one acceptable ordering of the list after a call of partition (list, 5) would be [−1, 1, 2, 4, −3, 12, 8, 21, 6, 30, 15, 9]. You may assume that the list contains no duplicates and does not contain the element value E.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.