Update linkedlist.cpp

second last element , last element same.... correctly purging!!