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.
Day 11: 2D Arrays
Day 11: 2D Arrays
Sort by
recency
|
1924 Discussions
|
Please Login in order to post a comment
best solution arr.append(list(map(int, input().rstrip().split()))) maxSum = - 63 for i in range(4): for j in range(4): hourglassSum = (arr[i][j] + arr[i][j+1] + arr[i][j+2] + arr[i+1][j+1] + arr[i+2][j] + arr[i+2][j+1] + arr[i+2][j+2]) maxSum = max(maxSum, hourglassSum) print(maxSum)
in c#
List> arr = new List>();
in java
public class Solution { public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
}
Here's my javascript solution:-
In C++
int main() {
}