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
|
3668 Discussions
|
Please Login in order to post a comment
In Python, key is to import inf first so cases with only negative numbers pass:
PHP solution
using Java Script
'use strict';
const fs = require('fs');
process.stdin.resume(); process.stdin.setEncoding('utf-8');
let inputString = ''; let currentLine = 0;
process.stdin.on('data', function(inputStdin) { inputString += inputStdin; });
process.stdin.on('end', function() { inputString = inputString.split('\n');
});
function readLine() { return inputString[currentLine++]; }
/* * Complete the 'hourglassSum' function below. * * The function is expected to return an INTEGER. * The function accepts 2D_INTEGER_ARRAY arr as parameter. */
function hourglassSum(arr) { // Write your code here function hourglassArrays(arr) { let rows = arr.length let cols = arr[0].length let subArrays = []
}
function main() { const ws = fs.createWriteStream(process.env.OUTPUT_PATH);
}
my solution for this Question: