Click here to Skip to main content
15,891,184 members
Home / Discussions / C#
   

C#

 
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 
AnswerRe: Algorithm Question - Urgent Help Needed Pin
HymanRoth9-Nov-05 0:43
HymanRoth9-Nov-05 0:43 
GeneralRe: Algorithm Question - Urgent Help Needed Pin
allenmpcx9-Nov-05 0:47
allenmpcx9-Nov-05 0:47 
AnswerRe: Algorithm Question - Urgent Help Needed Pin
leppie9-Nov-05 6:58
leppie9-Nov-05 6:58 
QuestionSource File: c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config Line: 198 Pin
israfel8-Nov-05 23:02
israfel8-Nov-05 23:02 
QuestionUse of Datagrid for non database app Pin
ratinahat0018-Nov-05 22:41
ratinahat0018-Nov-05 22:41 
AnswerRe: Use of Datagrid for non database app Pin
Rody van Sambeek9-Nov-05 13:07
Rody van Sambeek9-Nov-05 13:07 
QuestionCRC-16 Convert to C vb.Net Pin
RichardBerry8-Nov-05 22:22
RichardBerry8-Nov-05 22:22 
QuestionRetreive file list from remote server using ftp - Error 226 - Urgent help required Pin
SheenSylesh8-Nov-05 22:03
SheenSylesh8-Nov-05 22:03 

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.