You are given a String disk representing the clusters on a disk. An 'X' represents a used cluster,
and a '.' represents an available cluster. You are also given an int size representing the size,
in clusters, of a file waiting to be written to disk. A file can only be stored in clusters not already being used.
Return the minimum number of groups of consecutive clusters needed to store the file on the disk.
(The disk does not wrap around at the end.) Return -1 if the disk does not have enough space available
to store the file.
int minimumFragmentation(String disk, int size)
(be sure your method is public)
disk will contain between 1 and 50 characters, inclusive.
Each character of disk will be 'X' or '.'.
size will be between 1 and 50, inclusive.
We can't fit the file on the disk.
There is only ever one cluster together, so all six clusters are separated.
We fit eight clusters together, and four clusters together.
This problem statement is the exclusive and proprietary property of TopCoder, Inc.
Any unauthorized use or reproduction of this information without the prior written
consent of TopCoder, Inc. is strictly prohibited. (c)2003, TopCoder, Inc. All rights reserved.