Posts Tagged as Algorithms

Efficient AVL Tree in C#

The AVL tree is a rigorously balance binary search tree with very fast and stable insert, delete and search times. I like the various .NET dictionaries but have been unimpressed by…

Recursive Select in C# and LINQ

To complement my post on recursive joins to create hierarchical structures, here's the opposite code to flatten a hierarchy by performing a recursive select in LINQ and returning a…

Point in Polygon Hit Testing

Checking to see if a point is inside a polygon is useful for 2D game development. Here's an algorithm in Java to do check if a given point is inside a polygon which only iterates t…

Priority Queue in C#

Priority queues are really useful for path finding algorithms like A*. Also, for applications like mobile games, memory management is still an important consideration. I have used…