Tip 1 : solved questions daily
Tip 2 : makes self notes in understandable language
Tip 3 : learn daily new things
Tip 1 : no false information about you
Tip 2 : define your skills in best way

Let the first array be : ‘arr1’ = {1,5,8,4} and the second array be ‘arr2’ = {3,7,16,1}
For this, the maximum sum takes the sub-array {5,8} from the first ‘arr1’ and {7,16} from arrays, two, the OR sum will be 13 + 23 = 26, which is maximum.



If A = [3, 2, 3], and K = 2.
Then max of [3, 2] = 3 and max of [2, 3] = 3
So, the answer will be [3, 3]
If A = [3, 2, 3, 5, 1, 7] and K = 3.
Then max of [3, 2, 3] = 3
Then max of [2, 3, 5] = 5
Then max of [3, 5, 1] = 5
Then max of [5, 1, 7] = 7
So the answer will be [3, 5, 5, 7]
Can you solve the problem in O(N) time complexity and O(K) space complexity?

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?