by

## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• Jun 03 2015 02:30

Contains duplicates 2 3 sum and 4 sum (compare)

• May 28 2015 20:35

Isomorphic Strings (compare)

• May 27 2015 22:02

Calculate 7n/8 without using mu… (compare)

• May 27 2015 21:47

Find largest pair sum (compare)

• May 27 2015 20:47

Trie (compare)

• May 27 2015 20:24

Trie (compare)

• May 27 2015 19:57

Trie insert and search (compare)

• May 26 2015 20:31

Divide Two numbers (compare)

• May 26 2015 20:07

Search for a range (compare)

• May 26 2015 19:52

Max subarray - Kadane algorithm (compare)

• May 26 2015 17:50

Sort colors (compare)

• May 26 2015 17:38

Excel sheet col title (compare)

• May 26 2015 16:29

Largest number (compare)

• May 26 2015 06:58

• May 26 2015 06:57

Min size subarr sum - O(n) solu… (compare)

• May 26 2015 03:05

Kth largest element in an array (compare)

• May 26 2015 03:00

Contains duplicates (compare)

• May 26 2015 02:56

ATOI (compare)

• May 25 2015 21:09

DT code (compare)

• May 21 2015 21:43

Update styles.css (compare)

Abhishek Dey Das
Hello
veeraarrabolu
@veeraarrabolu
hello
Abhishek Dey Das
How's it going?
Abhishek Dey Das
adeydas/Algorithm-Practice@a8dd8cc Does this hold the bijection property?
Jon-Pierre Sanchez
@jsanchez034
Hey guys can someone help me out ? For the below algorithm can you tell me why the Big O runtime is O($n^2$) ? I'm think that the last block where there is three nested for loops would make it O($n^3$)
n = 1000
for c from 1 to n
for d from 1 to n
result $$c^3$$ + $$d^3$$
append (c, d) to list at value map[result]

for each result, list in map
for each pair1 in list
for each pair2 in list
print pair1, pair2
Al Johri
@AlJohri
rakeshsenapathi
@rakeshsenapathi
Hi people
Can someone explain the time complexity of this function ?
int fun(int n)
{
int count = 0;
for (int i = 0; i < n; i++)
for (int j = i; j > 0; j--)
count = count + 1;
return count;
}
amit19968
@amit19968
Is it O(n^2)