Given a square matrix, calculate the absolute difference between the sums of its diagonals.
function diagonalDifference(arr) {
// arr eg: [ [ 11, 2, 4 ], [ 4, 5, 6 ], [ 10, 8, -12 ] ]
const arrLength = arr.length
import * as React from 'react' | |
import { ApolloProvider } from '@apollo/client' | |
import { initApolloClient } from './apollo-client' | |
/* | |
This wrapper helps to provide Apollo functionality during SSR, while rehydrating | |
on the client with a pre-populated cache of the query results. | |
Refer to https://github.com/zeit/next.js/blob/canary/examples/api-routes-apollo-server-and-client/apollo/client.js | |
for more source. |