Greetings,
I'm currently trying to code something that'll store the last 20
tells/gossips/whatever more channel we want.
This history should be viewable through a command let's call it history.
Syntax would be: history <channel>
Anyway I first did this with arrays but I was told that it consumed lots of
memory I was also told to take a
look at linked lists. I've been taking a look at them for the last 3 hours.
Though, linked lists doesn't have a
size it seems, they keep growing, what would I do to make them just list the
*last* 20 tells or last 20
gossips. Would I remove the first node once I hit 21 nodes? Would I list the
last 20 nodes? wouldn't that
list be huge if I don't remove a node once I hit 21. Is there anyway to give
a linked list a fixed size? Or
am I just dreaming...