About 50 results
Open links in new tab
  1. 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 problem into half and do …

  2. How can I find the time complexity of an algorithm?

    1. Introduction In computer science, the time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the length of the string representing the input. 2. Big O …

  3. algorithm - how to calculate binary search complexity - Stack Overflow

    Nov 18, 2011 · 5 The time complexity of the binary search algorithm belongs to the O (log n) class. This is called big O notation. The way you should interpret this is that the asymptotic growth of the time …

  4. What is Sliding Window Algorithm? Examples? - Stack Overflow

    Nov 25, 2011 · While solving a geometry problem, I came across an approach called Sliding Window Algorithm. Couldn't really find any study material/details on it. What is the algorithm about?

  5. Efficient algorithm for detecting cycles in a directed graph

    35 In my opinion, the most understandable algorithm for detecting cycle in a directed graph is the graph-coloring-algorithm. Basically, the graph coloring algorithm walks the graph in a DFS manner (Depth …

  6. What is the difference between an algorithm and a function?

    An algorithm is a series of steps (a process) for performing a calculation, whereas a function is the mathematical relationship between parameters and results. A function in programming is different …

  7. What is the difference between an on-line and off-line algorithm?

    Jul 16, 2012 · An on-line algorithm is one that receives a sequence of requests and performs an immediate action in response to each request. In contrast,an off-line algorithm performs action after …

  8. Algorithm to return all combinations of k elements from n

    Sep 24, 2008 · 60 The following recursive algorithm picks all of the k-element combinations from an ordered set: choose the first element i of your combination combine i with each of the combinations …

  9. Negative weights using Dijkstra's Algorithm - Stack Overflow

    Variants of Dijkstra's Algorithm The key is there are 3 kinds of implementation of Dijkstra's algorithm, but all the answers under this question ignore the differences among these variants. Using a nested for …

  10. algorithm - Calculate distance between two latitude-longitude points ...

    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 system and I'd like to …