Clean up old and new files

This commit is contained in:
2020-05-01 00:02:45 -04:00
parent 4eb25a22b1
commit 7ebcb12569
18 changed files with 43 additions and 769 deletions

View File

@@ -185,12 +185,13 @@ bool CircleSingleList::isEmpty() const
*
* @return int The value held at the Node at the head of our linked list
*/
void CircleSingleList::peek() const
int CircleSingleList::peek() const
{
// If there is only one data member, a circular list node will point to itself
if (!isEmpty())
std::cout << "[" << tail->next->data << "] is at the top of our list\n";
else std::cout << "Nothing to peek, our list is empty...\n";
return tail->next->data;
}
/** print

View File

@@ -13,7 +13,7 @@
#include <iostream>
class CircleSingleList{
class CircleSingleList {
public:
CircleSingleList() : tail(NULL) {};
CircleSingleList(const CircleSingleList& rhs);
@@ -25,7 +25,7 @@ class CircleSingleList{
bool replace(int val, int key);
void makeEmpty();
bool isEmpty() const;
void peek() const;
int peek() const;
void print() const;
bool find(int val) const;