Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions about the science and art of determining properties of algorithms, often including correctness, runtime and space usage. Use the [runtime-analysis] tag for questions about the runtime of algorithms.
2
votes
1
answer
85
views
Dijkstra Partitioning Algorithm : Special Case
I have been exploring Dikstra partitioning Algorithm. Below are my given:
R = Red
W = White
B = Blue
I have this unpartitioned array.
| W | B | R | W | R | W | B | W | W |
I want it par …
3
votes
1
answer
846
views
Worst Case Space Complexity of Merge Sort and Bubble Sort
I understand that the worst space complexity of Bubble Sort is constant O(1), since all the space we need is the array where the elements were stored. But why is Merge Sort's worst space complexity O( …
2
votes
1
answer
159
views
Algorithm Analysis of Insertion Sort
Why is the recurrence formula for insertion sort is T(n-1) + n?
I understand the T(n-1) part but the why does the cost for merging results is n or linear. Do we have to merge in insertion sort?
0
votes
2
answers
381
views
Karatsuba Multiplication Rule in dividing a Number in two parts
In Karatsuba algorithm for multiplying two numbers, we divide each number into two. For example:
x= 1234
y= 2456
Then a = 12, b = 34, c = 24 , d = 56
What if the digits in each number are not even …
2
votes
1
answer
606
views
Average Case Running Time of Quicksort Algorithm
From this website, it states that the average case of Quicksort algorithm is
T(n) = T(n/9) + T(9n/10) + θ(n)
Im a bit confused. Is it supposed to be ?
T(n) = T(n/10) + T(9n/10) + θ(n)