Linked Lists

Feb 25, 2017 at 9:43pm
You will be linking a series of nodes together to implement a single linked list class. Define a Node as a struct that holds a character (like they did in the book) and a pointer to another Node:

struct Node {

char data;

Node* next;

};

Then define a LinkedList class which has (at a minimum) these member functions:

LinkedList();

~LinkedList();

bool insertAtFront();

bool insertBeforePosition(int index);

bool insertAtBack();

bool deleteAtFront();
bool deleteBeforePosition(int index);

bool deleteAtBack();

I have most of the functions but can someone please help me create the "insertAtFront" and "deleteAtFront" function? This is really confusing me.
Last edited on Feb 25, 2017 at 9:55pm
Feb 25, 2017 at 10:26pm
closed account (48T7M4Gy)
Best and quickest way to get help is to have a go yourself, submit your code and show us where you are having trouble.
Topic archived. No new replies allowed.