Question d’entretien chez Snowflake

Find the longest subarray that equals K

Réponse à la question d'entretien

Utilisateur anonyme

26 avr. 2018

I gave the naive approach which is O(n^2). But the interviewer gave prefix sum array and was expecting me to optimize the problem.