• Tutorials
  • DSA
  • Data Science
  • Web Tech
  • Courses
May 30, 2022 |5.8K Views

Maximum equal sum possible in three stacks

  Share   Like
Description
Discussion

Given three stacks of the positive numbers, the task is to find the possible equal maximum sum of the stacks with the removal of top elements allowed. Stacks are represented as an array, and the first index of the array represent the top element of the stack.

Examples:

Input : stack1[] = { 3, 10}
 stack2[] = { 4, 5 }
 stack3[] = { 2, 1 }
Output : 0
Sum can only be equal after removing all elements 
from all stacks.

Maximum equal sum possible in three stacks: https://www.geeksforgeeks.org/find-maximum-sum-possible-equal-sum-three-stacks/