Driver Code
public static void Main ( ) { int [ ] arr = { 5 , - 2 , - 1 , 3 , - 4 } ; int n = arr . Length ; Console . WriteLine ( " Length ▁ of ▁ longest ▁ subarray ▁ " + " having ▁ maximum ▁ sum ▁ = ▁ " + lenLongSubarrWithMaxSum ( arr , n ) ) ; } }