lower-bound

Pixies in the custard swamp puzzle

(With thanks to Rich Bradshaw) I'm looking for optimal strategies for the following puzzle. As the new fairy king, it is your duty to map the kingdom's custard swamp. The swamp is covered in an ethereal mist, with islands of custard scattered throughout. You can send your pixies across the swamp, with instructions to fly low or high...

What .NET dictionary supports a "find nearest key" operation?

I'm converting some C++ code to C# and it calls std::map::lower_bound(k) to find an entry in the map whose key is equal to or greater than k. However, I don't see any way to do the same thing with .NET's SortedDictionary. I suspect I could implement a workaround using SortedList, but unfortunately SortedList is too slow (O(n) for inserti...