Click here to Skip to main content
15,895,667 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Big Oh Computation Pin
Ian Uy12-Aug-08 8:57
Ian Uy12-Aug-08 8:57 
GeneralRe: Big Oh Computation Pin
Jason Lepack (LeppyR64)12-Aug-08 9:01
Jason Lepack (LeppyR64)12-Aug-08 9:01 
GeneralRe: Big Oh Computation Pin
supercat912-Aug-08 10:06
supercat912-Aug-08 10:06 
GeneralRe: Big Oh Computation Pin
Ian Uy12-Aug-08 16:24
Ian Uy12-Aug-08 16:24 
GeneralRe: Big Oh Computation Pin
Mark Churchill12-Aug-08 20:35
Mark Churchill12-Aug-08 20:35 
GeneralRe: Big Oh Computation Pin
Ian Uy13-Aug-08 2:49
Ian Uy13-Aug-08 2:49 
AnswerRe: Big Oh Computation Pin
Ian Uy15-Aug-08 6:56
Ian Uy15-Aug-08 6:56 
GeneralRe: Big Oh Computation Pin
Member 419459316-Aug-08 3:20
Member 419459316-Aug-08 3:20 
It is O(1). It has nothing to do with what is inside the loop (as long as it is not another loop dependent upon "n"), just how many times you execute the loop. In your stated case, it is linear, for each increase of n you only execute the loop one more time.
GeneralRe: Big Oh Computation Pin
Mark Churchill17-Aug-08 15:18
Mark Churchill17-Aug-08 15:18 
GeneralRe: Big Oh Computation Pin
Ian Uy17-Aug-08 19:29
Ian Uy17-Aug-08 19:29 
GeneralRe: Big Oh Computation Pin
Mark Churchill17-Aug-08 19:33
Mark Churchill17-Aug-08 19:33 
AnswerRe: Big Oh Computation Pin
sableng22-Aug-08 10:04
sableng22-Aug-08 10:04 
Questionde-Compress algorith Pin
Howard Richards11-Aug-08 22:57
Howard Richards11-Aug-08 22:57 
QuestionPatterns for data sorting/grouping in memory Pin
petrveit5-Aug-08 4:15
petrveit5-Aug-08 4:15 
AnswerRe: Patterns for data sorting/grouping in memory [modified] Pin
Alan Balkany5-Aug-08 4:42
Alan Balkany5-Aug-08 4:42 
AnswerRe: Patterns for data sorting/grouping in memory Pin
Mark Churchill5-Aug-08 4:45
Mark Churchill5-Aug-08 4:45 
QuestionBin Packing Algorithm [modified] Pin
248912830-Jul-08 2:22
248912830-Jul-08 2:22 
AnswerRe: Bin Packing Algorithm Pin
CPallini30-Jul-08 2:39
mveCPallini30-Jul-08 2:39 
AnswerRe: Bin Packing Algorithm Pin
Alan Balkany30-Jul-08 3:22
Alan Balkany30-Jul-08 3:22 
GeneralRe: Bin Packing Algorithm Pin
Paul Conrad30-Jul-08 6:12
professionalPaul Conrad30-Jul-08 6:12 
GeneralRe: Bin Packing Algorithm Pin
248912830-Jul-08 19:17
248912830-Jul-08 19:17 
GeneralRe: Bin Packing Algorithm Pin
Tim Craig30-Jul-08 21:31
Tim Craig30-Jul-08 21:31 
GeneralRe: Bin Packing Algorithm Pin
248912830-Jul-08 22:45
248912830-Jul-08 22:45 
GeneralRe: Bin Packing Algorithm Pin
CPallini30-Jul-08 23:25
mveCPallini30-Jul-08 23:25 
GeneralRe: Bin Packing Algorithm Pin
Tim Craig31-Jul-08 9:36
Tim Craig31-Jul-08 9:36 

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.