From 08effc85815bf286e4f688dcbadf5859fa5ac0b0 Mon Sep 17 00:00:00 2001 From: Roland Hummel Date: Sun, 3 Oct 2021 10:05:57 +0200 Subject: [PATCH] Credit where credit's due: Add reference to original author (and added a missing comment) --- Backtracking/RatInAMaze.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Backtracking/RatInAMaze.js b/Backtracking/RatInAMaze.js index effd154c8..8ebdd7f44 100644 --- a/Backtracking/RatInAMaze.js +++ b/Backtracking/RatInAMaze.js @@ -6,6 +6,8 @@ * - The rat can not move diagonally. * * Reference for this problem: https://www.geeksforgeeks.org/rat-in-a-maze-backtracking-2/ + * + * Based on the original implementation contributed by Chiranjeev Thapliyal (https://github.com/chiranjeev-thapliyal). */ /** @@ -110,6 +112,7 @@ export class RatInAMaze { /** Path from the source [0, 0] to the target [N-1, N-1]. */ #_path = '' + /** Whether the rat could find a way to the target or not. */ #_solved = false constructor (grid) {