ex- [1,2,3] o/p- 2
explanation- 1 completely and 1 from 3 so there will be [2 2]
on given array find maximum number of consecutive subarray on given k
ex- k=3 , arr= [3,4,9] so o/p - 5
explanation- [1,2,3,4,5] [2,3,4,5,6]
two kingdom having war return the total number of sets possible which has friend kingdom in continuous mode from 1 to n
ex- [2,4,5] [3,5,6] o/p- 8
explanation- {1},{1,2}, {2}, {3}, {3,4}, {4}, {5}, {6}