Adding solution to sorted merge.