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

C#

 
GeneralRe: C# find a string in a 2010 Microsoft Word document Pin
Pete O'Hanlon5-Oct-15 4:53
mvePete O'Hanlon5-Oct-15 4:53 
RantProgramming Pin
Member 115145063-Oct-15 14:59
Member 115145063-Oct-15 14:59 
GeneralRe: Programming Pin
BillWoodruff3-Oct-15 16:43
professionalBillWoodruff3-Oct-15 16:43 
GeneralRe: Programming Pin
OriginalGriff3-Oct-15 21:38
mveOriginalGriff3-Oct-15 21:38 
GeneralRe: Programming Pin
Gerry Schmitz4-Oct-15 12:17
mveGerry Schmitz4-Oct-15 12:17 
GeneralRe: Programming Pin
BillWoodruff4-Oct-15 18:33
professionalBillWoodruff4-Oct-15 18:33 
GeneralRe: Programming Pin
JBargisen8-Oct-15 22:10
JBargisen8-Oct-15 22:10 
QuestionShell Sort Algorithm question Pin
Member 117609771-Oct-15 15:19
Member 117609771-Oct-15 15:19 
Hello,I understand Shell Sort definition but I can not understand
this C# code:

C#
public void shellSort()
{
int inner, outer;
long temp;

int h = 1;

while(h <= nElems/3)
   h = h*3 + 1;

while(h>0)
   {


   for(outer=h; outer<nElems; outer++)
         {
         temp = theArray[outer];
         inner = outer;

         while(inner > h-1 && theArray[inner-h] >=   temp)
            {
            theArray[inner] = theArray[inner-h];
            inner -= h;
            }
         theArray[inner] = temp;
         }   // end for
   h = (h-1) / 3;
   }   // end while(h>0)

}   // end shellSort()



please help me thx!

modified 2-Oct-15 4:39am.

AnswerRe: Shell Sort Algorithm question Pin
BillWoodruff1-Oct-15 20:24
professionalBillWoodruff1-Oct-15 20:24 
AnswerRe: Shell Sort Algorithm question Pin
Richard Deeming2-Oct-15 1:40
mveRichard Deeming2-Oct-15 1:40 
QuestionMessage Removed Pin
1-Oct-15 2:45
Member 103698471-Oct-15 2:45 
QuestionCreate a Collection in C# Pin
macca241-Oct-15 1:27
macca241-Oct-15 1:27 
AnswerRe: Create a Collection in C# Pin
OriginalGriff1-Oct-15 1:42
mveOriginalGriff1-Oct-15 1:42 
GeneralRe: Create a Collection in C# Pin
macca241-Oct-15 1:46
macca241-Oct-15 1:46 
GeneralRe: Create a Collection in C# Pin
OriginalGriff1-Oct-15 1:53
mveOriginalGriff1-Oct-15 1:53 
GeneralRe: Create a Collection in C# Pin
macca241-Oct-15 2:32
macca241-Oct-15 2:32 
GeneralRe: Create a Collection in C# Pin
OriginalGriff1-Oct-15 3:56
mveOriginalGriff1-Oct-15 3:56 
GeneralRe: Create a Collection in C# Pin
macca241-Oct-15 4:12
macca241-Oct-15 4:12 
GeneralRe: Create a Collection in C# Pin
OriginalGriff1-Oct-15 4:15
mveOriginalGriff1-Oct-15 4:15 
GeneralRe: Create a Collection in C# Pin
macca241-Oct-15 4:50
macca241-Oct-15 4:50 
GeneralRe: Create a Collection in C# Pin
OriginalGriff1-Oct-15 5:02
mveOriginalGriff1-Oct-15 5:02 
GeneralRe: Create a Collection in C# Pin
macca241-Oct-15 5:18
macca241-Oct-15 5:18 
GeneralRe: Create a Collection in C# Pin
OriginalGriff1-Oct-15 5:26
mveOriginalGriff1-Oct-15 5:26 
AnswerRe: Create a Collection in C# Pin
Pete O'Hanlon1-Oct-15 1:48
mvePete O'Hanlon1-Oct-15 1:48 
GeneralRe: Create a Collection in C# Pin
macca241-Oct-15 2:53
macca241-Oct-15 2:53 

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.