Skip to content

This project is an implementation of a linked list data structure in C++. A linked list is a fundamental data structure that consists of nodes connected together in a linear manner. Each node in the linked list contains data and a reference to the next node in the sequence.

License

Notifications You must be signed in to change notification settings

rbga/Linked-List-Implementation-in-C-using-Class-Constructor-Functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Linked List Implementation in C++

This C++ code provides a basic implementation of a linked list. The code is created by Ganeshaanand (Rishi) Balasubramanian, a Master of Applied Science in Electrical and Computer Engineering from Dalhousie University, Halifax, Canada (2022).

Linked List Overview

The linked list implementation consists of a LinkNode class representing a node in the linked list. Each node has two fields: key, which stores the data for the node, and next, which points to the next node in the list.

Functions

The code includes the following functions:

  • RootIns: Inserts a new node at the root of the linked list.
  • SpecificIns: Inserts a new node at a specific point in the linked list.
  • EndIns: Inserts a new node at the end of the linked list.
  • display: Prints the contents of the linked list.
  • Remove: Removes a node from the linked list.
  • RemoveSpecific: Removes a specific node from the linked list.
  • ListLength: Returns the number of nodes in the linked list.

Usage

  1. Clone the repository or download the project files.
  2. Compile the code using a C++ compiler (supporting C++11 or later) with the necessary header files included.
  3. Run the compiled executable.

The code creates a linked list with 10 nodes and performs various operations such as inserting nodes at the root, specific positions, and the end. It also removes nodes from the list and calculates the size of the linked list.

Please note that this implementation is for educational purposes and may not cover all scenarios or optimizations.

Feel free to explore and modify the code to suit your specific needs. Happy coding!

About

This project is an implementation of a linked list data structure in C++. A linked list is a fundamental data structure that consists of nodes connected together in a linear manner. Each node in the linked list contains data and a reference to the next node in the sequence.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages