Posted: Sat Jul 07, 2007 1:57 pm
I try to solve this like DFS.
When n is up to 13, it works pretty well. But n goes up 14 and 15, it get TLE.
I have to optimize my code in order to avoid TLE.
Could you give me some hint how I can prune unvisited node under this non bangladesh sequence?
Thanks
When n is up to 13, it works pretty well. But n goes up 14 and 15, it get TLE.
I have to optimize my code in order to avoid TLE.
Could you give me some hint how I can prune unvisited node under this non bangladesh sequence?
Thanks