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
- Algorithms
- Warmup
- Diagonal Difference
- Discussions
Diagonal Difference
Diagonal Difference
Sort by
recency
|
5671 Discussions
|
Please Login in order to post a comment
One-liner in Python:
return abs(sum(arr[i][i] - arr[i][-i-1] for i in range(len(arr))))
with c
I am using Java 8 to sovle this problem. Pls give me answer if you have any questions. Thanks
C#
My solution using java: