Skip to content

Instantly share code, notes, and snippets.

View hyperion0201's full-sized avatar

Hieu Hoang hyperion0201

View GitHub Profile
@hyperion0201
hyperion0201 / SingleLinkedList.cpp
Created May 11, 2018 03:18
24 core functions about single linked list C++
#include "SingleLinkedList.h"
int CompareData(Data info1, Data info2) {
if (info1.x == info2.x) return 0;
else if (info1.x > info2.x) return 1;
return -1;
}
void InitList(List& l) {
l.pHead = l.pTail = NULL;
}
bool isEmptyList(List l) {