Credit where credit's due: Add reference to original author

(and added a missing comment)
This commit is contained in:
Roland Hummel
2021-10-03 10:05:57 +02:00
parent 0d5a3cef48
commit 08effc8581

View File

@ -6,6 +6,8 @@
* - The rat can not move diagonally. * - The rat can not move diagonally.
* *
* Reference for this problem: https://www.geeksforgeeks.org/rat-in-a-maze-backtracking-2/ * 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 from the source [0, 0] to the target [N-1, N-1]. */
#_path = '' #_path = ''
/** Whether the rat could find a way to the target or not. */
#_solved = false #_solved = false
constructor (grid) { constructor (grid) {