Linked List

V

venkatesh.k.desai5

Given a linked list with the following property
node2 is left child of node1, if node2 < node1
els, it is the right child.

O P
|
|
O A
|
|
O B
|
|
O C

How do you convert the above linked list to the
form without disturbing the property.

O P
|
|
O B
/ \
/ \
/ \
O ? O ?

where do A and C go?
 
J

Jack Klein

Given a linked list with the following property
node2 is left child of node1, if node2 < node1
els, it is the right child.

O P
|
|
O A
|
|
O B
|
|
O C

How do you convert the above linked list to the
form without disturbing the property.

O P
|
|
O B
/ \
/ \
/ \
O ? O ?

where do A and C go?

What is your question about the C programming language?

Also, your first example link list does not have the property you
describe, so there is no way to do what you ask. You cannot disturb a
property that is not present.
 
J

jacob navia

Jack Klein a écrit :
What is your question about the C programming language?

Also, your first example link list does not have the property you
describe, so there is no way to do what you ask. You cannot disturb a
property that is not present.

This guy doesn't even know how to cut/paste the homework correctly!
 
P

pete

Given a linked list with the following property
node2 is left child of node1, if node2 < node1
els, it is the right child.

That looks a heap, of the heapsort variety,
but not of the "stack and the heap" variety.
O P
|
|
O A
|
|
O B
|
|
O C

How do you convert the above linked list to the
form without disturbing the property.

O P
|
|
O B
/ \
/ \
/ \
O ? O ?

where do A and C go?

P has two children. You only show one.

Followup To:
 
R

Rod Pemberton

Jack Klein said:
What is your question about the C programming language?

Also, your first example link list does not have the property you
describe, so there is no way to do what you ask. You cannot disturb a
property that is not present.

In regards to:

I think you meant to use "can't" here... Use of contractions should be
avoided in a formal situation, such as a research paper. But, research
shows that not using contractions in informal situations is a solid
indicator of lying.


e.g., "I did not have sexual relations with that woman," Bill Clinton


Rod Pemberton
 
A

Al Balmer

In regards to:

I think you meant to use "can't" here... Use of contractions should be
avoided in a formal situation, such as a research paper. But, research
shows that not using contractions in informal situations is a solid
indicator of lying.

Posting such nonsense is a solid indicator of trolling.
 
R

Rod Pemberton

Al Balmer said:
Posting such nonsense is a solid indicator of trolling.

It's not nonsense or trolling. When I read his statements, the first
thought I had was "why is he lying?". I pointed out as courtesy because I
couldn't figure out why he'd be lying. And, as I stated, I didn't think he
was. Also, research does confirm it.


Rod Pemberton
 
A

Al Balmer

It's not nonsense or trolling. When I read his statements, the first
thought I had was "why is he lying?". I pointed out as courtesy because I
couldn't figure out why he'd be lying. And, as I stated, I didn't think he
was.

So he wasn't.
Also, research does confirm it.

And your observation above disproves it.
 
J

Jack Klein

In regards to:

I think you meant to use "can't" here... Use of contractions should be
avoided in a formal situation, such as a research paper. But, research
shows that not using contractions in informal situations is a solid
indicator of lying.


e.g., "I did not have sexual relations with that woman," Bill Clinton

"I did not have sexual relations with Bill Clinton", me.
 
R

Rod Pemberton

Al Balmer said:
So he wasn't.


And your observation above disproves it.

Faulty logic. My assumption doesn't prove anything about the intent his
statements. He could've been lying or telling the truth.


Rod Pemberton
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top