Longest Sub-Array with Sum K

https://practice.geeksforgeeks.org/problems/longest-sub-array-with-sum-k/0
@phantom Can you please tell me how to Solve it in o(n) time complexity.