Click here to Skip to main content
15,884,176 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: How .NET CLR understands More languages Pin
PIEBALDconsult12-Sep-14 5:31
mvePIEBALDconsult12-Sep-14 5:31 
GeneralRe: How .NET CLR understands More languages Pin
pitchaiyan12-Sep-14 5:42
pitchaiyan12-Sep-14 5:42 
RantRe: How .NET CLR understands More languages Pin
George Jonsson14-Sep-14 16:23
professionalGeorge Jonsson14-Sep-14 16:23 
AnswerRe: How .NET CLR understands More languages Pin
Richard MacCutchan12-Sep-14 5:58
mveRichard MacCutchan12-Sep-14 5:58 
QuestionAlgorithm to find a given number is prime or not. Pin
Member 110631236-Sep-14 1:21
Member 110631236-Sep-14 1:21 
GeneralRe: Algorithm to find a given number is prime or not. Pin
harold aptroot6-Sep-14 2:32
harold aptroot6-Sep-14 2:32 
GeneralRe: Algorithm to find a given number is prime or not. Pin
Member 110631236-Sep-14 4:01
Member 110631236-Sep-14 4:01 
GeneralRe: Algorithm to find a given number is prime or not. Pin
harold aptroot6-Sep-14 4:10
harold aptroot6-Sep-14 4:10 
Ok, now it makes more sense. The problem here is that 2 is a special case, and they did not handle it. Simply add a step: if the number is two, it is prime.
So in short, yes, the book is wrong and you are right.

edit: ok now it makes less sense, why are most of the steps gone again? What I wrote above should still apply though.
GeneralRe: Algorithm to find a given number is prime or not. Pin
Member 110631236-Sep-14 4:14
Member 110631236-Sep-14 4:14 
GeneralRe: Algorithm to find a given number is prime or not. Pin
Member 110631236-Sep-14 4:18
Member 110631236-Sep-14 4:18 
GeneralRe: Algorithm to find a given number is prime or not. Pin
harold aptroot6-Sep-14 4:49
harold aptroot6-Sep-14 4:49 
GeneralRe: Algorithm to find a given number is prime or not. Pin
Member 110631236-Sep-14 6:33
Member 110631236-Sep-14 6:33 
GeneralRe: Algorithm to find a given number is prime or not. Pin
harold aptroot6-Sep-14 7:22
harold aptroot6-Sep-14 7:22 
GeneralRe: Algorithm to find a given number is prime or not. Pin
Member 110631236-Sep-14 7:53
Member 110631236-Sep-14 7:53 
GeneralRe: Algorithm to find a given number is prime or not. Pin
Member 110631237-Sep-14 6:23
Member 110631237-Sep-14 6:23 
GeneralRe: Algorithm to find a given number is prime or not. Pin
Member 110631237-Sep-14 6:23
Member 110631237-Sep-14 6:23 
AnswerRe: Algorithm to find a given number is prime or not. Pin
Richard MacCutchan6-Sep-14 5:06
mveRichard MacCutchan6-Sep-14 5:06 
AnswerRe: Algorithm to find a given number is prime or not. Pin
PIEBALDconsult14-Nov-14 3:37
mvePIEBALDconsult14-Nov-14 3:37 
QuestionHow to describe method: SQL for frequent pattern discovery Pin
pseudogrammaton4-Sep-14 18:01
pseudogrammaton4-Sep-14 18:01 
AnswerRe: How to describe method: SQL for frequent pattern discovery Pin
Bernhard Hiller4-Sep-14 20:52
Bernhard Hiller4-Sep-14 20:52 
GeneralRe: How to describe method: SQL for frequent pattern discovery Pin
pseudogrammaton5-Sep-14 2:55
pseudogrammaton5-Sep-14 2:55 
QuestionBoundless Binary Search Pin
Igor van den Hoven27-Aug-14 10:24
Igor van den Hoven27-Aug-14 10:24 
GeneralRe: Boundless Binary Search Pin
harold aptroot4-Sep-14 21:28
harold aptroot4-Sep-14 21:28 
GeneralRe: Boundless Binary Search Pin
Igor van den Hoven6-Sep-14 10:04
Igor van den Hoven6-Sep-14 10:04 
GeneralRe: Boundless Binary Search Pin
harold aptroot6-Sep-14 11:10
harold aptroot6-Sep-14 11:10 

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.