Kevjumba94
Kevjumba94

Reputation: 19

Small application of a Doubly linked list

For homework I had to create a doubly linked list and make a small application that uses the data structure. Previously I had a similar homework with a Stack data structure, so I created a parenthesis matching app.

Can anyone suggest me a small app that could use a doubly linked list and that it shows how its better to use a doubly linked list over a single linked list.

Thanks

Upvotes: 0

Views: 573

Answers (2)

Tristan
Tristan

Reputation: 31

Think of the Back - Forward buttons of your web browser. The browser keeps a history of the links you have visited in a doubly linked list.

Upvotes: 3

paxdiablo
paxdiablo

Reputation: 881413

Make an application that stores names and phone numbers (as one example) and then give it the capability to output them in both ascending and descending order (based on name).

While a singly linked list would be efficient in one direction, the doubly linked version would be efficient in both.

Upvotes: 0

Related Questions