Relative Content

Tag Archive for algorithms

What does it mean by expected running time and average running time of an algorithm?

Let’s say we want to analyze running time of algorithms. Sometimes we say that we want to find the running time of an algorithm when the input size is n and for the worst possible case it is denote it by O(n). Sometimes though I see books/papers saying that we need to find the expected time of an algorithm. Also sometimes the average running time is used .

Why is the use of abstractions (such as LINQ) so taboo? [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Closed 9 years ago. Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. I am an independent contractor and, as such, I interview 3-4 times a year […]

QoS implementation algorithm

I’m working on an application, that does IP routing and QoS. Today we have the QoS implemented, with 3 priorities (low, normal and high) and for each level we create a Queue and as soon as the packages are queued, we send it forward in a FIFO way (the scheduler spend 60% of time with the high queue, 30% the time with normal and 10% with the low queue). It works, but as FIFO it has some drawbacks like:

Algorithm Analysis: Frequencies of Execution

I am currently reading the Analysis of Algorithms section in Algorithms, 4th Edition and I’m trying to understand how the author calculated (N^2)/2 and (N^3)/6 frequencies of execution in the code snippet below (here is the full code):