Changed pointer type for sortedArrayUsingComparator