I am working on an algorithm question from LeetCode. The question is called Remove Duplicates from Sorted Array. And I first try to write the solution on my local compiler (