Click here to Skip to main content
15,890,186 members
Home / Discussions / Algorithms
   

Algorithms

 
QuestionComputational image warping by Chessboard Mask Pin
Member 1259034018-Jun-16 4:11
Member 1259034018-Jun-16 4:11 
QuestionMinimal covering ring Pin
Member 1258329114-Jun-16 4:38
Member 1258329114-Jun-16 4:38 
SuggestionRe: Minimal covering ring Pin
Kornfeld Eliyahu Peter14-Jun-16 6:12
professionalKornfeld Eliyahu Peter14-Jun-16 6:12 
GeneralRe: Minimal covering ring Pin
harold aptroot30-Jun-16 3:03
harold aptroot30-Jun-16 3:03 
QuestionTricky algorithm i cant solve.. ||thank you in advence Pin
sPPa2-Jun-16 10:44
sPPa2-Jun-16 10:44 
AnswerRe: Tricky algorithm i cant solve.. ||thank you in advence Pin
Henry Faure4-Jul-16 9:25
Henry Faure4-Jul-16 9:25 
QuestionWhat Does Complexity of Algorithm Mean??? Pin
Django_Untaken26-May-16 1:09
Django_Untaken26-May-16 1:09 
AnswerRe: What Does Complexity of Algorithm Mean??? Pin
Rob Philpott26-May-16 1:27
Rob Philpott26-May-16 1:27 
An algorithm presents a method to do something which ideally works for all manner of inputs. As you know, there are lots of different sorting algorithms, but bearing in mind they are all meant to do the same thing, why so many?

It's to do with the starting condition. If a list is sorted already when you give it to a sorting algorithm, it doesn't have to do any sorting but merely determine that it is already sorted and nothing needs to be done. You can do this by making sure each item is bigger (or equal) to the last. This would be a best case scenario, but each of your N items in the list need to be checked so you end up with O(n) - this means linear performance. A list twice as long takes twice as long.

The worst possible case is when the list is sorted the wrong way around. In this case there are more items, and each item has to bubble up further so you end up with something like n * (n/2) required ops which becomes O(n*n). Each operation takes time so number of ops/time are the same thing here. Double the size and it takes 4 times as long.

In the space complexity O(1) means constant. No new space is required as the sort is contained within the datastructure.

In your case with 25 elements, best case means checking those 25 elements are in order. Worse case is bubbling each the furthest possible distance. A randomized list will be somewhere in between the extremes.
Regards,
Rob Philpott.

AnswerRe: What Does Complexity of Algorithm Mean??? Pin
Richard MacCutchan26-May-16 1:34
mveRichard MacCutchan26-May-16 1:34 
AnswerRe: What Does Complexity of Algorithm Mean??? Pin
harold aptroot26-May-16 1:35
harold aptroot26-May-16 1:35 
AnswerRe: What Does Complexity of Algorithm Mean??? Pin
Patrice T28-May-16 9:55
mvePatrice T28-May-16 9:55 
SuggestionRe: What Does Complexity of Algorithm Mean??? Pin
Richard Deeming1-Jun-16 1:24
mveRichard Deeming1-Jun-16 1:24 
GeneralRe: What Does Complexity of Algorithm Mean??? Pin
Patrice T1-Jun-16 1:45
mvePatrice T1-Jun-16 1:45 
QuestionHow they got this function? Pin
Member 125085107-May-16 1:51
Member 125085107-May-16 1:51 
AnswerRe: How they got this function? Pin
Chris Losinger12-May-16 6:33
professionalChris Losinger12-May-16 6:33 
QuestionIn Search for a Published Board Game Generating Algorithm Pin
Mark.io5-May-16 2:13
Mark.io5-May-16 2:13 
QuestionAlgorithm Pin
Member 1246448116-Apr-16 5:43
Member 1246448116-Apr-16 5:43 
AnswerRe: Algorithm Pin
Richard Deeming18-Apr-16 2:28
mveRichard Deeming18-Apr-16 2:28 
GeneralRe: Algorithm Pin
honglomong940@gmail.com29-Apr-16 22:50
honglomong940@gmail.com29-Apr-16 22:50 
AnswerRe: Algorithm Pin
Patrice T18-Apr-16 5:46
mvePatrice T18-Apr-16 5:46 
QuestionDealing with arbitrarily large power of 10 numbers Pin
Member 1168325115-Apr-16 3:52
Member 1168325115-Apr-16 3:52 
SuggestionRe: Dealing with arbitrarily large power of 10 numbers Pin
Richard Deeming15-Apr-16 4:21
mveRichard Deeming15-Apr-16 4:21 
GeneralRe: Dealing with arbitrarily large power of 10 numbers Pin
Member 1168325115-Apr-16 8:45
Member 1168325115-Apr-16 8:45 
AnswerRe: Dealing with arbitrarily large power of 10 numbers Pin
Eddy Vluggen15-Apr-16 5:00
professionalEddy Vluggen15-Apr-16 5:00 
AnswerRe: Dealing with arbitrarily large power of 10 numbers Pin
Kenneth Haugland15-Apr-16 14:43
mvaKenneth Haugland15-Apr-16 14:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.