CSCI 202 Homeworks 11


To partition arrays and Deques of Strings to experience the partition step of the Quicksort algorithm.

Due dates

The completed assignment must be submitted as Homework 11 of CSCI 202 on Moodle by 11:00 PM Thursday, April 5.

The task

Write two methods that implement that following headers:

These methods receive an array or Deque of Strings and a pivot String. They will return a new array or Deque of Strings which contains the same Strings as the input but where the elements less than or equal to the pivot are stored at the beginning of the new array or Deque.

If a String appears more than once in the input collection, it should appear the same number of times in the output collection. This actually makes the problem a lot easier.

This is not the same as partitioning the collection in place. Again, it is easier.