Implement the Slice and Splice Algorithm