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
- Arrays
- 2D Array - DS
- Discussions
2D Array - DS
2D Array - DS
Sort by
recency
|
3606 Discussions
|
Please Login in order to post a comment
Java
There is a compilation error, therefore when I try to type something, the code area does not display it.
!/bin/python3
import math import os import random import re import sys
#
Complete the 'hourglassSum' function below.
#
The function is expected to return an INTEGER.
The function accepts 2D_INTEGER_ARRAY arr as parameter.
#
from itertools import product
def hourglassSum(arr): # Generate all possible center coordinates for the hourglass within the 6x6 grid. C_coordinate = list(product(range(1, 5), repeat=2))
if name == 'main': fptr = open(os.environ['OUTPUT_PATH'], 'w')