Linked Questions

1 vote
2 answers
439 views

What is Big O Notation's length measured in? [duplicate]

I am using quicksort, which is NLog(N), and have 20 items to sort. Worst case is there for 26.02.... seconds? Really, seconds? I find that hard to believe, so what is the length measured in?
Nawlidge's user avatar
  • 105
1 vote
1 answer
498 views

Logarithmic growth [duplicate]

Possible Duplicate: Plain English explanation of Big O The wikipedia article on logarithmic growth is a stub. Many of the answers I read on stackoverflow give clarification of how efficient a ...
chris Frisina's user avatar
-4 votes
0 answers
634 views

Which complexity is less; O(n) or O(n logn)? [duplicate]

I was reading about complexities where n is the number of elements. I do some operation different ways and which results in these two different complexity. And have a doubt that which complexity is ...
user3735822's user avatar
0 votes
2 answers
623 views

Calculation time of NFS algorithm [duplicate]

It's quite usual to read : "the time needed to factor n by NFS algorithm is exp(...formula with ln(n)...)" But I can't find to which unit of time this formula refers ? Is it really time ? Or number ...
Andrew's user avatar
  • 1,050
0 votes
2 answers
197 views

What is degree of a polynomial f(n) = n/20 [duplicate]

If an algorithm executes a statement, it is n/2 times, then how come O is equal to O(n). Because the video explains that it is because of the degree of a polynomial. Please explain. for(int i =0;i&...
Vinee-the-Pooh's user avatar
1 vote
0 answers
372 views

How are T(n) and Theta(f(n)) different? [duplicate]

When people explain Theta notation, they just start talking about a function T(n) without explaining what it is. Is it just a given function? Why is it Theta(f(n)) instead of Theta(n)? Where did the ...
ahnbizcad's user avatar
  • 10.6k
-4 votes
1 answer
284 views

Complexity of algorithms in Big O notation [duplicate]

What is Big O notation and why do we measure complexity of any algorithm in Big O notation? An example will do the good.
Dhiren's user avatar
  • 428
-1 votes
1 answer
275 views

Data Structure & algorithms complexity [duplicate]

I'm studying for an exam and I can't seem to understand data structures & algorithm complexity i.e. I know that a linked-list has insert, get , delete method implementation, but what I cannot ...
Imtanan Raja's user avatar
-2 votes
1 answer
266 views

What does O(n) and O(k) mean? [duplicate]

I have this task: Given an array of integers and a number k, where 1 <= k <= length of the array, compute the maximum values of each subarray of length k. For example, given array = [10, 5, 2, ...
IceRevenge's user avatar
  • 1,541
-3 votes
2 answers
151 views

What is the Big O for this enqueue method? [duplicate]

I wrote code for an enqueue method in a singly linked list and I'm wondering if anyone can tell me the Big O is for this code. I at first assumed it was O(n) because of the loop. However, the loop ...
GeRmAnImAl's user avatar
1 vote
3 answers
157 views

I cannot understand the definition of big O notation [duplicate]

I am taking a Data Structure course this semester and I cannot understand the definition of big O notation. The definition says, f(n) = O(g(n)) if there exist positive constant C and n0 such that f(...
zodiac 's user avatar
1 vote
1 answer
136 views

Understanding Big-O Notation [duplicate]

I am reading a book "Beginning Algorithms" by Simon Harris and James Ross. In the early pages, there is a section on Understanding Big-O Notation. I read this section, and re-read this section maybe ...
Sameer's user avatar
  • 281
1 vote
2 answers
91 views

Big-O Efficiency measurement [duplicate]

I'm a java student who wants to get a better understanding of the big-O efficiency. For this problem, it is assumed that doIt() has an efficiency of O(n). j=n; while (j>0) { doIt(); ...
slasdxyz's user avatar
0 votes
2 answers
113 views

Calculating Big O [duplicate]

I am new to programming and I am trying to figure out how to calculate the Big O of algorithms. For example: int selectkth(int a[], int k, int n){ int i, j, mini, temp; for(i=0, i < k, i++)...
Sam's user avatar
  • 103
0 votes
0 answers
111 views

What's the input space and auxiliary space in this code block? [duplicate]

public static void main(String[] args){ int n; Scanner in = new Scanner(System.in); n=in.nextInt(); int[] arr = new int[n]; for(int i=0; i<=n; i++){ arr[i]=i*2; } } ...
hamal's user avatar
  • 55

15 30 50 per page
1 2
3
4 5
22