AmeriHome Mortgage interview question

Leetcode medium with strings and characters