Click here to Skip to main content
15,909,051 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# lock statement Pin
Jon Rista9-Nov-05 10:54
Jon Rista9-Nov-05 10:54 
NewsRe: C# lock statement Pin
Den2Fly9-Nov-05 13:45
Den2Fly9-Nov-05 13:45 
QuestionFTP Pin
v.k.s9-Nov-05 2:48
v.k.s9-Nov-05 2:48 
AnswerRe: FTP Pin
lmoelleb9-Nov-05 20:57
lmoelleb9-Nov-05 20:57 
QuestionC# control licence question Pin
dojdoj9-Nov-05 2:47
dojdoj9-Nov-05 2:47 
Questionhow to manipulate exe files ? Pin
hdv2129-Nov-05 2:09
hdv2129-Nov-05 2:09 
AnswerRe: how to manipulate exe files ? Pin
User 66589-Nov-05 3:48
User 66589-Nov-05 3:48 
QuestionC# and IUnknown (COM) Pin
MLS9-Nov-05 1:22
MLS9-Nov-05 1:22 
QuestionRecursive function to return the max key of nodes of a singly connected list? Pin
ektoras9-Nov-05 0:35
ektoras9-Nov-05 0:35 
QuestionRecursive function to display the number of nodes of a singly connected list? Pin
ektoras9-Nov-05 0:31
ektoras9-Nov-05 0:31 
AnswerRe: Recursive function to display the number of nodes of a singly connected list? Pin
J4amieC9-Nov-05 2:16
J4amieC9-Nov-05 2:16 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
ektoras9-Nov-05 3:36
ektoras9-Nov-05 3:36 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
Wjousts9-Nov-05 4:18
Wjousts9-Nov-05 4:18 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
ektoras9-Nov-05 7:20
ektoras9-Nov-05 7:20 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
Wjousts9-Nov-05 7:35
Wjousts9-Nov-05 7:35 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
J4amieC9-Nov-05 4:45
J4amieC9-Nov-05 4:45 
while I Agree with wjousts assertion that a) this is not a particularly difficult question and b) you should do your own homework Wink | ;) - I will provide some assistance.

You must know what a linked list is, if not go back and refer to your course notes. Recursion you probably also know about - essentially calling a function from itself (or put another way "to understand recursion, you must first understand recursion /geekhumour)

So, to help write this algorithm, I find it easy to start off in pseudo-code

while {not at end of list)
    Incrememnt counter
loop
return counter


Now, I know you super-highlight-stressed that you want it DISPLAYED and not RETURNED!!11 (your homework said display it right?) however in order to dispaly something...it must first be returned from somewhere.

Turning the above into a "recursive function" is the bit you've got to do. If this is not enough to get you going on your homework, then seriously consider whether you should be studying a subject you cannot do!

Good luck.
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
ektoras9-Nov-05 7:38
ektoras9-Nov-05 7:38 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
J4amieC9-Nov-05 9:27
J4amieC9-Nov-05 9:27 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
ektoras9-Nov-05 9:34
ektoras9-Nov-05 9:34 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
J4amieC9-Nov-05 10:00
J4amieC9-Nov-05 10:00 
GeneralRe: Recursive function to display the number of nodes of a singly connected list? Pin
ektoras9-Nov-05 10:27
ektoras9-Nov-05 10:27 
QuestionGDI+ metafile Pin
Timothy Tim9-Nov-05 0:23
Timothy Tim9-Nov-05 0:23 
QuestionURGENT!!!PLEASE...DataGrid Drag_Drop!! Pin
innocent738-Nov-05 23:56
innocent738-Nov-05 23:56 
QuestionAlgorithm Question - Urgent Help Needed Pin
allenmpcx8-Nov-05 23:40
allenmpcx8-Nov-05 23:40 
AnswerRe: Algorithm Question - Urgent Help Needed Pin
J4amieC9-Nov-05 0:19
J4amieC9-Nov-05 0:19 

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.