Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdded indexOf, indexOfFirstAppearance, and indexOfLastAppearance methods for SinglyLinkedList #1636
Conversation
…ods for the SinglyLinkedList


Describe your change:
I added three indexOf methods to the SinglyLinkedList Java data structure:
indexOf() - finds the logical index of the element specified as the parameter
indexOfFirstAppearance() - finds the logical index of the first appearance of the element specified as the parameter
indexOfLastAppearance() - finds the logical index of the last appearance of the element specified as the parameter
I also added various tests in the driver code to include the implementation of these three methods
Checklist: