79075118

Date: 2024-10-10 15:24:21
Score: 1
Natty:
Report link

I think the problem is that when you call the addLast function, you pass the current to the newNode.

I believe that when you add it to the end of the list, you should keep the current in the place it was so that the songs continue in the order they were in until you reach the last node and start over.

If you pass the current to the last node when you add it at the end, it looks like you moved to the last song and then go to the first song in the list.

In short: The way you add them to both is correct, but you shouldn't change the current when you add them at the end.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Hugo Cortez