I was able to submit a solution that was finally accepted. That said, my first attempt at a solution was getting the correct answer for every test suite scenario when it was run on the desktop version of the MATLAB, but the solution was nevertheless rejected. All I was doing was setting the end of a character vector to being empty (e.g. z(end) = [];), and I was being warned to use a logical or scalar value. This is a legitimate MATLAB command though.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.