Pergunta de entrevista da empresa EaseMyTrip.com

They mainly asked me to solve “Subarray Sum Equals K” using an optimized approach and explain the reasoning behind using prefix sums and a hashmap.