Implemented a Delete Function in Linked List