Given an array of characters, compress it in-place. The length after compression must always be smaller than or equal to the original array. Every element of the array should be a character (not int) of length 1. After you are done modifying the input array in-place, return the new length of the array.
O(n), where n is the number of elements in matrix
O(n), where n is the number of elements in matrix
Run make to build and run C++ files and run Swift files. Or you can run .playground file.