Pregunta de entrevista de Google

Can you implement a sliding window algorithm to detect if a string contains a permutation of another string?

Respuesta de la entrevista

Anónimo

14 jun 2025

I explained the logic using a fixed-size sliding window and frequency arrays to compare character counts. Then I implemented the code in C++ and optimized it using O(N) time complexity.