I need some help on the brigde crossing problem implementation (Java)... can someone assist me? If you're interested, I will send you the original problem... thank you.
this? https://en.m.wikipedia.org/wiki/Bridge_and_torch_problem what should be the output? 😅 do you have some/an attempt(s) implementing or thoughts for solving or atleast a pattern?
The code needs to handle any possibility
uefficient approach I'd say ... so the program should output who crosses at each step, right? (from the group thats fastest)
https://code.sololearn.com/cVMXVev0wk40 -> recursive thats the best I can do, it outputs the best path/order and time. (generating all possibilities is way too complicated, sry)
it's probably an assignment from school (or sth. like that), so they probably would accept something like that too Xd
Thanks, I'll use it to what I've done already
I know how to solve the bridge problem. My problem is implementing a code that will generate all possibilities and apply search algorithms to reach the goal state using the given maximum time and the times for each person. This should be true for 3,4,5 people.