We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Data Structures
- Stacks
- Equal Stacks
- Discussions
Equal Stacks
Equal Stacks
Sort by
recency
|
1134 Discussions
|
Please Login in order to post a comment
!/bin/python3
import math import os import random import re import sys
#
Complete the 'equalStacks' function below.
#
The function is expected to return an INTEGER.
The function accepts following parameters:
1. INTEGER_ARRAY h1
2. INTEGER_ARRAY h2
3. INTEGER_ARRAY h3
#
def equalStacks(h1, h2, h3): sum1, sum2, sum3 = sum(h1), sum(h2), sum(h3) i, j, k = 0, 0, 0
if name == 'main': fptr = open(os.environ['OUTPUT_PATH'], 'w')
or
using javascript
Here is my C++ solution:
public static int highest(int s1, int s2, int s3){ return Math.max(s1,Math.max(s2,s3)); }
}
}