A question about reference in Python.

G

Group

Hello, I'm studying algorithom. For concentrating on the question itself, I
intend to use Python to implement the algorithoms.

Now, I want to write a Red-Black Tree, and a List structure. In C/C++, I
can
use pointers to refer to children notes (or next notes). But, in
Python, how
can I do it? Except the sequence, I know not any way.

You'd better help me understan how can I transform the following C code into
Python:

/* a List */
struct {
int data;
int *next;
int *prev;
}

That's all. Thanks!
Kermit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top