https://leetcode.com/problems/valid-palindrome/
This is a relatively straightforward question – converting the string to an Array makes it easier to iterate over characters with two pointers – however that solution would take O(N) space.
Instead, we could use the .startIndex, .endIndex properties, along with the index(after:) and index(before:) methods of String struct to achieve a O(1) space, O(N) time solution.