Domanda di colloquio di Google

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

Risposta di colloquio

Anonimo

14 giu 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.