tagged [time-complexity]

Breadth First Search time complexity analysis

Breadth First Search time complexity analysis The time complexity to go over each adjacent edge of a vertex is, say, `O(N)`, where `N` is number of adjacent edges. So, for `V` numbers of vertices the ...

matrix multiplication algorithm time complexity

matrix multiplication algorithm time complexity I came up with this algorithm for matrix multiplication. I read somewhere that matrix multiplication has a time complexity of o(n^2). But I think my thi...

Add to SortedSet<T> and its complexity

Add to SortedSet and its complexity MSDN states the following [SortedSet(T).Add Method](http://msdn.microsoft.com/en-us/library/dd411709%28VS.100%29.aspx) : > If Count is less than the capacity of the...

24 Jan at 17:10

What is the complexity of these Dictionary methods?

What is the complexity of these Dictionary methods? Can anyone explain what is the complexity of the following `Dictionary` methods? I'm trying to figure out the complexity of a method I wrote: ``` pu...

Why is the time complexity of both DFS and BFS O( V + E )

Why is the time complexity of both DFS and BFS O( V + E ) The basic algorithm for BFS: So I would think the time complexity would be: ``` v1 + (incident edges) + v2 + (incident edges) + .... + v

Time complexity of Math.Sqrt()?

Time complexity of Math.Sqrt()? How can I find the complexity of this function? ``` private double EuclideanDistance(MFCC.MFCCFrame vec1, MFCC.MFCCFrame vec2) { double Distance = 0.0; for (int K = 0...

3 Jan at 18:52

Which is better: O(n log n) or O(n^2)

Which is better: O(n log n) or O(n^2) Okay so I have this project I have to do, but I just don't understand it. The thing is, I have 2 algorithms. and . Anyway, I find out in the project info that if ...

Hash table runtime complexity (insert, search and delete)

Hash table runtime complexity (insert, search and delete) Why do I keep seeing different runtime complexities for these functions on a hash table? On wiki, search and delete are O(n) (I thought the po...

.NET Framework Time complexity in the documentation

.NET Framework Time complexity in the documentation Where can I find the time complexity for methods in the standard .Net library? I use MSDN and it occasionally mentions time complexity, but not oft...

15 Jun at 12:49

What are the time complexities of various data structures?

What are the time complexities of various data structures? I am trying to list time complexities of operations of common data structures like Arrays, Binary Search Tree, Heap, Linked List, etc. and es...