Thursday, October 24, 2013

Today I was doing lab #6 about linked lists and I created a linked list class. When searching the linked list I had created for a specific item in the list, I used a loop instead of recursion. I should've used a helper method that took two parameters: a node and the item that was being searched. The helper method would look to see if that node held the item that was being searched, and if not then the helper would be called with the next node.

My linked list was functional but not optimal, I needed to think recursively and not loopy.

No comments:

Post a Comment