User Profile
Collapse
-
After looking more closely into the members of List<T> I realized it has the BinarySearch method already which I didnt see before. I didnt need to sort my list because I was just going to insert accordingly. Instead the BinarySearch returns a bitwise complement of the location where my new item should get inserted if it isnt already in the list which solves my BinaryInsert problem as well. -
Ordered Generic List
Hi I am creating a game for fun using c#. I have a function that determines the shortest distance between two locations on a grid. I am using a form of dijkstra's algorithm but it still seems to be a little too slow for me. When I ask for a location from one corner to another in a grid of 140 by 140. It takes about 4 seconds.
The list of possible paths gets pretty large and searching for the next shortest path involves an iteration...
No activity results to display
Show More
Leave a comment: