| |

VerySource

 Forgot password?
 Register
Search
View: 693|Reply: 2

Use class C to write an inverse algorithm (data structure) of a circular doubly linked list.

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-25 15:20:01
| Show all posts |Read mode
Use C class to write an inverse algorithm for a circular double linked list (data structure)
Reply

Use magic Report

1

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-2-14 13:15:02
| Show all posts
Data structure standard practice. All are pushed onto the stack and all are pushed off the stack
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-24 14:45:02
| Show all posts
struct Node
{
  struct Node * left;
  struct Node * right;
};

void travel (struct Node * head)
{
while (traversing the linked list)
{
  // swap the left and right of the current node
}
}
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list