Click here to Skip to main content
15,888,803 members
Home / Discussions / C#
   

C#

 
AnswerRe: i tried to make a sorting algorithms could you check and confirm ? Pin
Guffa6-Sep-08 1:41
Guffa6-Sep-08 1:41 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
oraanupi6-Sep-08 5:08
oraanupi6-Sep-08 5:08 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
oraanupi6-Sep-08 5:08
oraanupi6-Sep-08 5:08 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
Paul Conrad6-Sep-08 5:12
professionalPaul Conrad6-Sep-08 5:12 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
oraanupi6-Sep-08 5:20
oraanupi6-Sep-08 5:20 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
Paul Conrad6-Sep-08 5:31
professionalPaul Conrad6-Sep-08 5:31 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
oraanupi6-Sep-08 5:34
oraanupi6-Sep-08 5:34 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
Paul Conrad6-Sep-08 5:42
professionalPaul Conrad6-Sep-08 5:42 
It's nice how you make it generate random numbers and all, but the easiest way to test a sorting algorithm is by unit testing as leppie suggested. Do look into how to do that.

In your unit testing, you'll want to test for the (1) typical case, (2) best case, and (3) the worst case.

You already did the typical case by generating the random numbers. The best case is where you have the following: the list already sorted in ascending order - sort by ascending order - nothing gets sorted - no work done, and repeat in reverse for descending order - have the list already sorted in descending order.

The worse case test is like the best case, however, you test the ascending sort by a list that is already sorted in descending order, and do the reverse for descending.

"The clue train passed his station without stopping." - John Simmons / outlaw programmer

"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham


GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
leppie6-Sep-08 5:46
leppie6-Sep-08 5:46 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
Paul Conrad6-Sep-08 5:49
professionalPaul Conrad6-Sep-08 5:49 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
oraanupi6-Sep-08 5:54
oraanupi6-Sep-08 5:54 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
Paul Conrad6-Sep-08 5:57
professionalPaul Conrad6-Sep-08 5:57 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
oraanupi6-Sep-08 6:12
oraanupi6-Sep-08 6:12 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
Paul Conrad6-Sep-08 6:14
professionalPaul Conrad6-Sep-08 6:14 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
oraanupi6-Sep-08 5:49
oraanupi6-Sep-08 5:49 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
leppie6-Sep-08 5:34
leppie6-Sep-08 5:34 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
oraanupi6-Sep-08 5:50
oraanupi6-Sep-08 5:50 
GeneralRe: i tried to make a sorting algorithms could you check and confirm ? Pin
Guffa6-Sep-08 7:05
Guffa6-Sep-08 7:05 
QuestionI want to open windows application from image button click of web page. Pin
AtulRane5-Sep-08 20:01
AtulRane5-Sep-08 20:01 
AnswerRe: I want to open windows application from image button click of web page. Pin
WillemM5-Sep-08 20:17
WillemM5-Sep-08 20:17 
GeneralRe: I want to open windows application from image button click of web page. Pin
AtulRane5-Sep-08 20:25
AtulRane5-Sep-08 20:25 
GeneralRe: I want to open windows application from image button click of web page. Pin
WillemM5-Sep-08 20:27
WillemM5-Sep-08 20:27 
GeneralRe: I want to open windows application from image button click of web page. Pin
AtulRane5-Sep-08 20:36
AtulRane5-Sep-08 20:36 
GeneralRe: I want to open windows application from image button click of web page. Pin
WillemM5-Sep-08 20:37
WillemM5-Sep-08 20:37 
GeneralRe: I want to open windows application from image button click of web page. Pin
AtulRane5-Sep-08 20:41
AtulRane5-Sep-08 20:41 

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.