Cpp Find Substring Leetcode Spatial Reasoning