Add CMakeLists for all datastructs

+ Reorder, refactor comments
This commit is contained in:
2020-07-11 20:55:15 -04:00
parent be91573abc
commit a692a0f631
22 changed files with 168 additions and 50 deletions

View File

@@ -0,0 +1,18 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## About: An example of a circular doubly linked list implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## CMakeLists.txt
#
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
# Define the project name
project(CircleDouble)
# Define source files
set(SRC driver.cpp circledoublelist.cpp)
# Build an executable
add_executable(CircleDoubleDriver ${SRC})

View File

@@ -247,7 +247,7 @@ bool CircleDoubleList::insert(int val, Node *&tail)
// Relink the current head to the node after newNode
newNode->next = tail->next;
tail->next->prev = newNode;
// Relink our head and tail nodes, makine newNode the head node
// Relink our head and tail nodes, making newNode the head node
tail->next = newNode;
newNode->prev = tail;
}