Given an array containing N positive integers and an integer K, your task is to find the length of the longest Sub-Array with the sum of the elements equal to the given value K.
{
"A": [
4,
1,
1,
1,
2,
3,
5
],
"K": 5
}4{
"A": [
10,
5,
2,
7,
1,
9
],
"K": 15
}4{
"A": [
1,
2,
3,
4,
5
],
"K": 9
}3Sign in to Run Code and Submit