68 369
Assignments Done
Successfully Done
In November 2018

Answer to Question #62294 in Java | JSP | JSF for Paul

Question #62294
Give an implementation of the size() method for the singularly linked list class, assuming that we did not maintain size as an instance variable
Expert's answer
public int size() {
Node<AnyType> tmp = head;
int size = 0;
if (head == null) {
return size;
} else {
while (tmp.next != null) {
tmp = tmp.next;
return size;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions