Palo Alto Networks interview question

sliding window, array and string problems