Tag Archives: algorithms

Path finding: What would Kirk do?

In my previous post about the challenge of path finding on the XBOX with XNA, my A* algorithm benchmarks were abysmally slow. Recall from my previous post that pathfinding was done in 3D, including diagonal movement, allowing 26 possible directions … Continue reading

3 Comments

Occurences of one string in another.

The string “ABC” occurs in “ABBC” twice, if you remove any characters you wish from “ABBC”. The following algorithm finds such occurences in O(n) time given any two strings. One assumption worth noting for the O(n) time bound is that … Continue reading

Posted in Coding, Misc | Tagged , | 1 Comment

Extract Longest Non-Decreasing Sequence From Any Sequence

I wrote some python code that extracts the longest non-decreasing subsequence from any given sequence. This runs in O(n log n) time, and uses O(n) memory. ”’ An item in the final sequence, used to form a linked list. ”’ … Continue reading

Posted in Coding, Misc | Tagged , | 10 Comments