Backtracking Algorithms
I just started loving the algorithms , especially backtracking algorithms.This geekforgeeks page gives more details on backtracking
https://www.geeksforgeeks.org/rat-in-a-maze-backtracking-2/
Solving this problem in Rust programming will be a little more interesting. Even more fun if we can build this as Rust Wasm app. Webassembly (wasm) is one of the latest technology that web developers are interested in. So thought of building the rat-maze as a Yew app.
Yew is a modern Rust framework for creating multi-threaded front-end web apps with WebAssembly
Read mroe about Yew here - https://yew.rs/docs/en/
I used following dependencies -
Backtracking -
This is one of the algorithm every programmer should try and understand. It will involve recursion and push and pop values from Results.
In my program, "solve" is the method actually implemented this backtracking
Yew Component:
The full program is below for your reference:
Output:
No comments:
Post a Comment