Hi. New here. I’ve only just recently discovered Kotlin and going through the process of absorbing it all now. Really impressed so far, especially with the try.kotlinlang.org and the hands on experience without any software download.
While analysing the Maze example I noticed one possible improvement to the path searching algorithm for your consideration. Function findPath
- instead of the line:
if (newCell in visited) continue
you could do:
if (newCell in visited || newCell in queue) continue
It speeds it up a lot. Thanks.