🚀 160 Days of DSA - Day 62
🔍 Longest Subarray with Sum K

✨ Approach
1️⃣ Use prefix sum &amp; hash map to track indices
2️⃣ Check if current sum equals k
3️⃣ If not, look for (current_sum - k) in the map

⚡ Complexity: O(n) Time, O(n) Space
#gfg160 #geekstreak2024
@geeksforgeeks
#gfg160 #geekstreak2024