Is it possible for a Linked list to have null header but not a null tail? I mean when the header is null does this mean that the list is empty?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That doesn’t make much sense from a logical point of view does it? So no.
Especially if you look at the actual implementation of the LinkedList in Java which uses one element as both head and tail (the last element of the list is the prev element of the dummy node, the first element of the list is the next element).