Linked Lists solutions (C++)