Skip to content

Instantly share code, notes, and snippets.

// You will be given a 2-dimensional grid of letters. Write a method to find the length of the longest path of consecutive
// letters, starting at 'A'. Paths can step from one letter in the grid to any adjacent letter (horizontally, vertically,
// or diagonally).
// For example, in the following grid, there are several paths from 'A' to 'D', but none from 'A' to 'E':
function abcLongestPath(matrix) {
let maxPath = 0;
const initPos = [];
@nodkrot
nodkrot / .jsbeautifyrc
Last active November 4, 2018 21:32
SublimeText Sync Settings
{
"json": {
"indent_size": 2,
"brace_style": "collapse",
"keep_array_indentation": true
}
}
@nodkrot
nodkrot / aws-sns-example.js
Created July 24, 2016 01:37 — forked from tmarshall/aws-sns-example.js
aws-sdk sns example, in Node.js
var AWS = require('aws-sdk');
AWS.config.update({
accessKeyId: '{AWS_KEY}',
secretAccessKey: '{AWS_SECRET}',
region: '{SNS_REGION}'
});
var sns = new AWS.SNS();