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
|
3573 Discussions
|
Please Login in order to post a comment
It's really an easy exercise? kkk?
python 3
def hourglassSum(arr): # Write your code here max=-1000 for i in range(1,5): for j in range(1,5): temp=arr[i][j]+arr[i-1][j-1]+arr[i-1][j]+arr[i-1][j+1]+arr[i+1][j-1]+arr[i+1][j]+arr[i+1][j+1]; if temp>max: max=temp
Javascript...
Here is my solution #swift