### Knight Move from Point A to Point B (Time Limit Exceeded)

Posted:

**Wed Jul 17, 2013 2:21 pm**Problem: http://poj.org/problem?id=1915

My solution:

BFS traversal starting from point A till it visits point B.

I received

more efficient solution. Hence asking for help here.

I have used C++ STL queue.

http://poj.org/showmessage?message_id=162038 (use google translate to convert from Chinese to English)

Here its mentioned that using list is faster than queue. But i wonder do I need to do such trick

to get my solution accepted.

My solution:

BFS traversal starting from point A till it visits point B.

I received

**Time Limit Exceeded**for my solution. I am not able to figure out if there's anothermore efficient solution. Hence asking for help here.

I have used C++ STL queue.

http://poj.org/showmessage?message_id=162038 (use google translate to convert from Chinese to English)

Here its mentioned that using list is faster than queue. But i wonder do I need to do such trick

to get my solution accepted.