
What is the difference between a heuristic and an algorithm?
Feb 25, 2010 · An algorithm is the description of an automated solution to a problem. What the algorithm does is precisely defined. The solution could or could not be the best possible one …
algorithm - Finding all possible combinations of numbers to reach …
Jan 8, 2011 · How would you go about testing all possible combinations of additions from a given set N of numbers so they add up to a given final number? A brief example: Set of numbers to …
algorithm - Calculate distance between two latitude-longitude …
Aug 26, 2008 · How do I calculate the distance between two points specified by latitude and longitude? For clarification, I'd like the distance in kilometers; the points use the WGS84 …
Is there an efficient algorithm to generate a 2D concave hull?
The answer may still be interesting for somebody else: One may apply a variation of the marching square algorithm, applied (1) within the concave hull, and (2) then on (e.g. 3) different scales …
c - Fast CRC algorithm? - Stack Overflow
CRC32 algorithm is exactly what I'm looking for, but I can't use it because the table it requires is way too huge (it is for an embedded system where resources are VERY rare). So: any …
Finding the median of an unsorted array - Stack Overflow
May 19, 2012 · There is still no linear algorithm in existence AFAIK for finding the median of an arbitrary, unsorted dataset. Think about it - a dataset that contains values 1..25 has true …
algorithm - What does O (log n) mean exactly? - Stack Overflow
Feb 22, 2010 · A common algorithm with O (log n) time complexity is Binary Search whose recursive relation is T (n/2) + O (1) i.e. at every subsequent level of the tree you divide …
how do *you* calculate/approximate Big O? - Stack Overflow
Most people with a degree in CS know what Big O stands for. It helps us to measure how well an algorithm scales. How do you calculate or approximate the complexity of your algorithms?
When should I use TCP_NODELAY and when TCP_CORK?
Sep 21, 2010 · 39 TCP_NODELAY Used to disable Nagle's algorithm to improve TCP/IP networks and decrease the number of packets by waiting until an acknowledgment of …
algorithm - Looping in a spiral - Stack Overflow
Dec 30, 2008 · A friend was in need of an algorithm that would let him loop through the elements of an NxM matrix (N and M are odd). I came up with a solution, but I wanted to see if my fellow …