Question: Write a Function indexOf(element) in Java that returns the index of the first occurence of an element in the singly-linked list. it returns -1 if
Write a Function indexOf(element) in Java that returns the index of the first occurence of an element in the singly-linked list. it returns -1 if element does not occur in the list.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
