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

C#

 
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 
What have you tried? Show people that you are thinking about this and not just too lazy to do your homework and you'll find people are much more responsive.

You need to write a recursive function, something like this (you fill in the blanks):

<code>
public int CountNodes(Node n)
{
    if(ExitCondition)    // what's your exit condition?
    {
        return ?;        // what should you return for your base 
case?
    }
    else
    {
    // what do you need to return here. What are you going to pass to the recursive call?
        return ? + CountNodes(?);     
    } 
}
</code>

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 
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 

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.