Roblox Interview Question

Algorithmic question on sliding window palindrome checking