10-11-2013 09:20 PM - edited 10-11-2013 09:20 PM
Hi Everyone,
Herewith attached my workable Breadth fist search (FIFO) code - queue based. Now, I would like to change to LIFO - stacked based.
Anyone here can give some guideline on it?
Many thanks.
10-12-2013 02:14 AM
Use enqueue data at the opposite end, and normal dequeue will give pretty much the same result as stack.
10-12-2013 05:36 AM
Hi KateB,
i've just realized that the attached code is queue stacked based which is meaned queued LIFO. What if I want to change to FIFO? what should i change? Any guideline on it?
10-12-2013 10:02 PM
use simple enqueue function
10-12-2013 10:24 PM
I've changed it to queue FIFO. but in the end, it won't show a complete path to reach the destination point. However, queue stack LIFO can show a complete path from starting point till the goal point.
Does that means queue FIFO cannot be used in finding a complete path out? Is there any possible way for this method to find its way out?
Herewith attached queue FIFO.
10-13-2013 09:49 AM
So when is your homework due?
10-13-2013 11:35 AM
Hi Intaris,
On this coming week.